optimize bound vars replacement :3

This commit is contained in:
lcnr 2022-07-28 16:55:15 +02:00
parent c3fce8e937
commit 1436fa9e90
2 changed files with 24 additions and 20 deletions

View file

@ -71,7 +71,7 @@ where
if var_values.var_values.is_empty() {
value
} else {
let mut delegate = FnMutDelegate {
let delegate = FnMutDelegate {
regions: |br: ty::BoundRegion| match var_values.var_values[br.var].unpack() {
GenericArgKind::Lifetime(l) => l,
r => bug!("{:?} is a region but value is {:?}", br, r),
@ -86,6 +86,6 @@ where
},
};
tcx.replace_escaping_bound_vars_uncached(value, &mut delegate)
tcx.replace_escaping_bound_vars_uncached(value, delegate)
}
}