borrow_check/type_check: normalize Aggregate and Call operands.
This commit is contained in:
parent
ad1617bb49
commit
8989029476
2 changed files with 17 additions and 0 deletions
15
src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs
Normal file
15
src/test/ui/consts/issue-70773-mir-typeck-lt-norm.rs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
// run-pass
|
||||
|
||||
const HASH_LEN: usize = 20;
|
||||
struct Hash([u8; HASH_LEN]);
|
||||
fn init_hash(_: &mut [u8; HASH_LEN]) {}
|
||||
|
||||
fn foo<'a>() -> &'a () {
|
||||
Hash([0; HASH_LEN]);
|
||||
init_hash(&mut [0; HASH_LEN]);
|
||||
&()
|
||||
}
|
||||
|
||||
fn main() {
|
||||
foo();
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue