diff options
Diffstat (limited to 'tests/ui/resolve/issue-85348.rs')
-rw-r--r-- | tests/ui/resolve/issue-85348.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/resolve/issue-85348.rs b/tests/ui/resolve/issue-85348.rs new file mode 100644 index 000000000..3a33c1934 --- /dev/null +++ b/tests/ui/resolve/issue-85348.rs @@ -0,0 +1,12 @@ +// Checks whether shadowing a const parameter leads to an ICE (#85348). + +impl<const N: usize> ArrayWindowsExample { +//~^ ERROR: cannot find type `ArrayWindowsExample` in this scope [E0412] + fn next() { + let mut N; + //~^ ERROR: let bindings cannot shadow const parameters [E0530] + //~| ERROR: type annotations needed [E0282] + } +} + +fn main() {} |