Normalize the result of Fields::ty_with_args
We were only instantiating before, which would leak an AliasTy. I added a test case that reproduce the issue seen here: https://github.com/model-checking/kani/issues/3113
This commit is contained in:
parent
d779a7a25f
commit
a325bce3cd
3 changed files with 101 additions and 3 deletions
|
@ -420,7 +420,10 @@ impl<'tcx> Context for TablesWrapper<'tcx> {
|
|||
let tcx = tables.tcx;
|
||||
let args = args.internal(&mut *tables, tcx);
|
||||
let def_ty = tables.tcx.type_of(item.internal(&mut *tables, tcx));
|
||||
def_ty.instantiate(tables.tcx, args).stable(&mut *tables)
|
||||
tables
|
||||
.tcx
|
||||
.instantiate_and_normalize_erasing_regions(args, ty::ParamEnv::reveal_all(), def_ty)
|
||||
.stable(&mut *tables)
|
||||
}
|
||||
|
||||
fn const_pretty(&self, cnst: &stable_mir::ty::Const) -> String {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue