summaryrefslogtreecommitdiffstats
path: root/src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs
blob: dd56faa318570698d0c8f63ec63dba2c51c400e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// run-pass

const HASH_LEN: usize = 20;
struct Hash(#[allow(unused_tuple_struct_fields)] [u8; HASH_LEN]);
fn init_hash(_: &mut [u8; HASH_LEN]) {}

fn foo<'a>() -> &'a () {
    Hash([0; HASH_LEN]);
    init_hash(&mut [0; HASH_LEN]);
    let (_array,) = ([0; HASH_LEN],);
    &()
}

fn main() {
    foo();
}