diff options
Diffstat (limited to '')
-rw-r--r-- | tests/ui/consts/issue-116186.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/consts/issue-116186.rs b/tests/ui/consts/issue-116186.rs new file mode 100644 index 000000000..a77c38c64 --- /dev/null +++ b/tests/ui/consts/issue-116186.rs @@ -0,0 +1,12 @@ +#![allow(incomplete_features)] +#![feature(generic_const_exprs)] + +fn something(path: [usize; N]) -> impl Clone { + //~^ ERROR cannot find value `N` in this scope + match path { + [] => 0, //~ ERROR cannot pattern-match on an array without a fixed length + _ => 1, + }; +} + +fn main() {} |