Files
rust/tests/ui/pattern/generic-in-path.stderr
2026-07-22 15:35:11 +02:00

15 lines
469 B
Plaintext

error[E0158]: constant pattern cannot depend on generic parameters
--> $DIR/generic-in-path.rs:12:9
|
LL | impl<const N: usize> Thing<N> {
| -----------------------------
LL | const A: Self = Thing;
| ------------- constant defined here
...
LL | <Thing<N>>::A => {}
| ^^^^^^^^^^^^^ `const` depends on a generic parameter
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0158`.