Skip to content

Commit

Permalink
add regression test for rust-lang#120
Browse files Browse the repository at this point in the history
  • Loading branch information
oli-obk committed Feb 7, 2017
1 parent 98cda6c commit aaba692
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/run-pass/recursive_static.rs
Original file line number Diff line number Diff line change
@@ -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);
}

0 comments on commit aaba692

Please sign in to comment.