about summary refs log tree commit diff
path: root/tests/ui/pattern/issue-72565.stderr
AgeCommit message (Collapse)AuthorLines
2024-12-04Specify type kind of constant that can't be used in patternsEsteban Küber-2/+2
``` error: trait object `dyn Send` cannot be used in patterns --> $DIR/issue-70972-dyn-trait.rs:6:9 | LL | const F: &'static dyn Send = &7u32; | -------------------------- constant defined here ... LL | F => panic!(), | ^ trait object can't be used in patterns ```
2024-12-04On `const` pattern errors, point at the `const` item definitionEsteban Küber-0/+3
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"), | ^^^^ ```
2023-11-24Show number in error message even for one errorNilstrieb-1/+1
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-05-31Only rewrite valtree-constants to patterns and keep other constants opaqueOli Scherer-1/+1
2023-01-11Move /src/test to /testsAlbert Larsan-0/+8