]> git.lizzy.rs Git - rust.git/blob - src/test/ui/resolve/shadow-const-param.stderr
Merge commit '05677b6bd6c938ed760835d9b1f6514992654ae3' into sync_cg_clif-2021-08-06
[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`.