rust/tests/ui/consts/cycle-static-promoted.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

13 lines
221 B
Rust
Raw Normal View History

//@ 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() {}