]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs
Do not suggest `let_else` if no bindings would be introduced
[rust.git] / src / test / ui / consts / issue-70773-mir-typeck-lt-norm.rs
1 // run-pass
2
3 const HASH_LEN: usize = 20;
4 struct Hash([u8; HASH_LEN]);
5 fn init_hash(_: &mut [u8; HASH_LEN]) {}
6
7 fn foo<'a>() -> &'a () {
8     Hash([0; HASH_LEN]);
9     init_hash(&mut [0; HASH_LEN]);
10     let (_array,) = ([0; HASH_LEN],);
11     &()
12 }
13
14 fn main() {
15     foo();
16 }