Commit Graph

6 Commits

Author SHA1 Message Date
Esteban Küber
4e6a401b22 review comments: reword messages and simplify logic 2024-12-04 20:49:05 +00:00
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
Ralf Jung
67c99d6338 avoid creating an Instance only to immediately disassemble it again 2024-07-18 11:58:16 +02:00
Matthew Jasper
4feec41e05 #![feature(inline_const_pat)] is no longer incomplete 2024-02-01 10:27:54 +00:00
Camille GILLOT
05082f57af Perform match checking on THIR. 2023-04-03 15:59:21 +00:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests 2023-01-11 09:32:08 +00:00