diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/consts/cycle-static-promoted.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/ui/consts/cycle-static-promoted.rs b/tests/ui/consts/cycle-static-promoted.rs new file mode 100644 index 00000000000..5838dc58a3a --- /dev/null +++ b/tests/ui/consts/cycle-static-promoted.rs @@ -0,0 +1,12 @@ +// check-pass + +struct Value { + values: &'static [&'static Value], +} + +// This `static` recursively points to itself through a promoted (the slice). +static VALUE: Value = Value { + values: &[&VALUE], +}; + +fn main() {} |
