2017-08-02 01:01:16 -05:00
|
|
|
// FIXME: Disable validation until we figure out how to handle recursive statics.
|
|
|
|
// compile-flags: -Zmir-emit-validate=0
|
|
|
|
|
2017-02-07 13:38:23 -06:00
|
|
|
struct S(&'static S);
|
|
|
|
static S1: S = S(&S2);
|
|
|
|
static S2: S = S(&S1);
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let p: *const S = S2.0;
|
|
|
|
let q: *const S = &S1;
|
|
|
|
assert_eq!(p, q);
|
|
|
|
}
|