]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs
Rollup merge of #70910 - rakshith-ravi:master, r=cuviper
[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     &()
11 }
12
13 fn main() {
14     foo();
15 }