]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-33537.rs
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / issue-33537.rs
1 // run-pass
2
3 const fn foo() -> *const i8 {
4     b"foo" as *const _ as *const i8
5 }
6
7 const fn bar() -> i32 {
8     *&{(1, 2, 3).1}
9 }
10
11 fn main() {
12     assert_eq!(foo(), b"foo" as *const _ as *const i8);
13     assert_eq!(bar(), 2);
14 }