]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/shadow-const-param.stderr
Auto merge of #85270 - ChrisDenton:win-env-case, r=m-ou-se
[rust.git] / src / test / ui / resolve / shadow-const-param.stderr
1 error[E0530]: match bindings cannot shadow const parameters
2   --> $DIR/shadow-const-param.rs:7:9
3    |
4 LL | fn foo<const N: i32>(i: i32) -> bool {
5    |              - the const parameter `N` is defined here
6 LL |     match i {
7 LL |         N @ _ => true,
8    |         ^ cannot be named the same as a const parameter
9
10 error[E0530]: let bindings cannot shadow const parameters
11   --> $DIR/shadow-const-param.rs:13:9
12    |
13 LL | fn bar<const N: i32>(i: i32) -> bool {
14    |              - the const parameter `N` is defined here
15 LL |     let N @ _ = 0;
16    |         ^ cannot be named the same as a const parameter
17
18 error: aborting due to 2 previous errors
19
20 For more information about this error, try `rustc --explain E0530`.