Don't access a static just for its size and alignment

This commit is contained in:
Oliver Scherer 2019-07-25 19:29:48 +02:00
parent eedf6ce4ef
commit b75dfa8a2b
2 changed files with 24 additions and 14 deletions

View file

@ -0,0 +1,11 @@
// check-pass
struct Foo {
foo: Option<&'static Foo>
}
static FOO: Foo = Foo {
foo: Some(&FOO),
};
fn main() {}