normalize field projection ty to fix broken MIR issue
This commit is contained in:
parent
66f7a5d92f
commit
7bafb5704d
2 changed files with 2 additions and 0 deletions
|
@ -686,6 +686,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
|
|||
let fty = self.sanitize_type(place, fty);
|
||||
match self.field_ty(place, base, field, location) {
|
||||
Ok(ty) => {
|
||||
let ty = self.cx.normalize(ty, location);
|
||||
if let Err(terr) = self.cx.eq_types(
|
||||
ty,
|
||||
fty,
|
||||
|
|
|
@ -7,6 +7,7 @@ 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],);
|
||||
&()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue