optimize bound vars replacement :3
This commit is contained in:
parent
c3fce8e937
commit
1436fa9e90
2 changed files with 24 additions and 20 deletions
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue