rust/tests/ui/consts/const-eval/ice-unsized-struct-const-eval-123154.rs
Gurinder Singh c30e15aded Fail candidate assembly for erroneous types
Trait predicates for types which have errors may still
evaluate to OK leading to downstream ICEs. Now we return
a selection error for such types in candidate assembly and
thereby prevent such issues
2024-04-16 12:42:48 +05:30

16 lines
229 B
Rust

// Regression test for #123154
struct AA {
pub data: [&usize]
//~^ ERROR missing lifetime specifier
}
impl AA {
const fn new() -> Self { }
//~^ ERROR mismatched types
}
static ST: AA = AA::new();
fn main() {}