Skip to content

Commit aaba692

Browse files
committed
add regression test for #120
1 parent 98cda6c commit aaba692

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/run-pass/recursive_static.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#![feature(static_recursion)]
2+
3+
struct S(&'static S);
4+
static S1: S = S(&S2);
5+
static S2: S = S(&S1);
6+
7+
fn main() {
8+
let p: *const S = S2.0;
9+
let q: *const S = &S1;
10+
assert_eq!(p, q);
11+
}

0 commit comments

Comments
 (0)