refactor(rustc_middle): Substs -> GenericArg
This commit is contained in:
parent
df5c2cf9bc
commit
e55583c4b8
466 changed files with 4574 additions and 4604 deletions
|
@ -999,14 +999,14 @@ pub fn iter_fields<'tcx>(
|
|||
f(None, field.into(), ty);
|
||||
}
|
||||
}
|
||||
ty::Adt(def, substs) => {
|
||||
ty::Adt(def, args) => {
|
||||
if def.is_union() {
|
||||
return;
|
||||
}
|
||||
for (v_index, v_def) in def.variants().iter_enumerated() {
|
||||
let variant = if def.is_struct() { None } else { Some(v_index) };
|
||||
for (f_index, f_def) in v_def.fields.iter().enumerate() {
|
||||
let field_ty = f_def.ty(tcx, substs);
|
||||
let field_ty = f_def.ty(tcx, args);
|
||||
let field_ty = tcx
|
||||
.try_normalize_erasing_regions(param_env, field_ty)
|
||||
.unwrap_or_else(|_| tcx.erase_regions(field_ty));
|
||||
|
@ -1014,8 +1014,8 @@ pub fn iter_fields<'tcx>(
|
|||
}
|
||||
}
|
||||
}
|
||||
ty::Closure(_, substs) => {
|
||||
iter_fields(substs.as_closure().tupled_upvars_ty(), tcx, param_env, f);
|
||||
ty::Closure(_, args) => {
|
||||
iter_fields(args.as_closure().tupled_upvars_ty(), tcx, param_env, f);
|
||||
}
|
||||
_ => (),
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue