rust/compiler/rustc_mir_build/src
Esteban Küber 87ddc1ea33 Point at generic param through which a const is used in a pattern
```
error[E0158]: constant pattern depends on a generic parameter, which is not allowed
  --> $DIR/associated-const-type-parameter-pattern.rs:20:9
   |
LL | pub trait Foo {
   | -------------
LL |     const X: EFoo;
   |     ------------- constant defined here
...
LL | pub fn test<A: Foo, B: Foo>(arg: EFoo) {
   |             - constant depends on this generic param
LL |     match arg {
LL |         A::X => println!("A::X"),
   |         ^^^^ `const` depends on a generic parameter
```
2024-12-04 20:29:36 +00:00
..
build remove Ty::is_copy_modulo_regions 2024-12-02 13:57:56 +01:00
thir Point at generic param through which a const is used in a pattern 2024-12-04 20:29:36 +00:00
check_unsafety.rs Implement the unsafe-fields RFC. 2024-11-21 19:32:07 +01:00
errors.rs Point at generic param through which a const is used in a pattern 2024-12-04 20:29:36 +00:00
lib.rs Add warn(unreachable_pub) to rustc_mir_build. 2024-08-29 20:13:06 +10:00
lints.rs unconditional recursion, yeet TypingEnv::from_param_env 2024-11-19 18:06:20 +01:00