rust/src/test/ui/consts/const-eval/issue-47971.rs

10 lines
171 B
Rust
Raw Normal View History

// build-pass (FIXME(62277): could be check-pass?)
2018-02-06 03:24:53 -06:00
struct S(pub &'static u32, pub u32);
const fn g(ss: &S) -> &u32 { &ss.1 }
static T: S = S(g(&T), 0);
fn main () { }