diff options
Diffstat (limited to 'src/test/ui/binding/const-param.rs')
| -rw-r--r-- | src/test/ui/binding/const-param.rs | 12 | 
1 files changed, 12 insertions, 0 deletions
| diff --git a/src/test/ui/binding/const-param.rs b/src/test/ui/binding/const-param.rs new file mode 100644 index 00000000000..3c7f4d071f6 --- /dev/null +++ b/src/test/ui/binding/const-param.rs @@ -0,0 +1,12 @@ +// Identifier pattern referring to a const generic parameter is an error (issue #68853). + +#![feature(const_generics)] //~ WARN the feature `const_generics` is incomplete + +fn check<const N: usize>() { + match 1 { + N => {} //~ ERROR const parameters cannot be referenced in patterns + _ => {} + } +} + +fn main() {} | 
