about summary refs log tree commit diff
path: root/tests/coverage/branch/lazy-boolean.rs
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2024-11-20 02:15:21 +0000
committerEsteban Küber <esteban@kuber.com.ar>2024-12-04 20:29:35 +0000
commitc6205055e085a1210c1503978225d34147a0d8bd (patch)
tree478f64801bff49436a65db792b8af786e0bdc9ce /tests/coverage/branch/lazy-boolean.rs
parent490b2cc09860dd62a7595bb07364d71c12ce4e60 (diff)
downloadrust-c6205055e085a1210c1503978225d34147a0d8bd.tar.gz
rust-c6205055e085a1210c1503978225d34147a0d8bd.zip
On `const` pattern errors, point at the `const` item definition
Centralize emitting an error in `const_to_pat` so that all errors from that evaluating a `const` in a pattern can add addditional information. With this, now point at the `const` item's definition:

```
error[E0158]: constant pattern depends on a generic parameter
  --> $DIR/associated-const-type-parameter-pattern.rs:20:9
   |
LL | pub trait Foo {
   | -------------
LL |     const X: EFoo;
   |     ------------- constant defined here
...
LL |         A::X => println!("A::X"),
   |         ^^^^
```
Diffstat (limited to 'tests/coverage/branch/lazy-boolean.rs')
0 files changed, 0 insertions, 0 deletions