mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-30 12:07:40 +00:00

- Add primary span labels. - Point at const generic parameter used as pattern. - Point at statics used as pattern. - Point at let bindings used in const pattern.
13 lines
378 B
Plaintext
13 lines
378 B
Plaintext
error[E0158]: constant parameters cannot be referenced in patterns
|
|
--> $DIR/const-param.rs:5:9
|
|
|
|
|
LL | fn check<const N: usize>() {
|
|
| -------------- constant defined here
|
|
LL | match 1 {
|
|
LL | N => {}
|
|
| ^ can't be used in patterns
|
|
|
|
error: aborting due to 1 previous error
|
|
|
|
For more information about this error, try `rustc --explain E0158`.
|