1
Fork 0

Auto merge of #97081 - oli-obk:outlives_query_fast_path, r=jackh726

Re-use the type op instead of calling the implied_outlives_bounds query directly

r? `@ghost`
This commit is contained in:
bors 2022-06-07 21:44:40 +00:00
commit b17e9d76f2
6 changed files with 72 additions and 57 deletions

View file

@ -334,8 +334,8 @@ impl<'tcx> UniversalRegionRelationsBuilder<'_, 'tcx> {
/// either the return type of the MIR or one of its arguments. At
/// the same time, compute and add any implied bounds that come
/// from this local.
#[instrument(level = "debug", skip(self))]
fn add_implied_bounds(&mut self, ty: Ty<'tcx>) -> Option<Rc<QueryRegionConstraints<'tcx>>> {
debug!("add_implied_bounds(ty={:?})", ty);
let TypeOpOutput { output: bounds, constraints, .. } = self
.param_env
.and(type_op::implied_outlives_bounds::ImpliedOutlivesBounds { ty })