rust/tests/ui/consts/const-eval/issue-47971.rs
2023-01-11 09:32:08 +00:00

10 lines
134 B
Rust

// check-pass
struct S(pub &'static u32, pub u32);
const fn g(ss: &S) -> &u32 { &ss.1 }
static T: S = S(g(&T), 0);
fn main () { }