Rollup merge of #71488 - spastorino:normalize-ty-to-fix-broken-mir, r=eddyb
normalize field projection ty to fix broken MIR issue Fixes #71344 r? @eddyb
This commit is contained in:
commit
5aebbe9ea2
@ -689,6 +689,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…
Reference in New Issue
Block a user