rust/tests/ui/consts/erroneous_type_in_promoted.rs
2024-05-23 10:48:39 +00:00

15 lines
261 B
Rust

//! ICE test #124348
//! We should not be running const eval if the layout has errors.
enum Eek {
TheConst,
UnusedByTheConst(Sum),
//~^ ERROR cannot find type `Sum` in this scope
}
const fn foo() {
let x: &'static [Eek] = &[];
}
fn main() {}