add regression test for #120
This commit is contained in:
parent
98cda6cb07
commit
aaba692eff
1 changed files with 11 additions and 0 deletions
11
tests/run-pass/recursive_static.rs
Normal file
11
tests/run-pass/recursive_static.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
#![feature(static_recursion)]
|
||||
|
||||
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);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue