diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2024-11-20 02:15:21 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2024-12-04 20:29:35 +0000 |
| commit | c6205055e085a1210c1503978225d34147a0d8bd (patch) | |
| tree | 478f64801bff49436a65db792b8af786e0bdc9ce /tests/coverage/branch/lazy-boolean.rs | |
| parent | 490b2cc09860dd62a7595bb07364d71c12ce4e60 (diff) | |
| download | rust-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
