]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/mir_check_nonconst.rs
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / mir_check_nonconst.rs
1 #![allow(dead_code)]
2
3 struct Foo { a: u8 }
4 fn bar() -> Foo {
5     Foo { a: 5 }
6 }
7
8 static foo: Foo = bar();
9 //~^ ERROR cannot call non-const fn
10
11 fn main() {}