diff options
Diffstat (limited to 'tests/ui/binding/const-param.rs')
-rw-r--r-- | tests/ui/binding/const-param.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/binding/const-param.rs b/tests/ui/binding/const-param.rs new file mode 100644 index 000000000..2d051808f --- /dev/null +++ b/tests/ui/binding/const-param.rs @@ -0,0 +1,10 @@ +// Identifier pattern referring to a const generic parameter is an error (issue #68853). + +fn check<const N: usize>() { + match 1 { + N => {} //~ ERROR const parameters cannot be referenced in patterns + _ => {} + } +} + +fn main() {} |