use implied bounds compat mode in MIR borrowck
This commit is contained in:
parent
d3c9082a44
commit
058ab53dc5
8 changed files with 46 additions and 24 deletions
|
@ -48,14 +48,22 @@ impl<'tcx> super::QueryTypeOp<'tcx> for ImpliedOutlivesBounds<'tcx> {
|
|||
param_env.and(ty)
|
||||
});
|
||||
|
||||
tcx.implied_outlives_bounds(canonicalized)
|
||||
if tcx.sess.opts.unstable_opts.no_implied_bounds_compat {
|
||||
tcx.implied_outlives_bounds(canonicalized)
|
||||
} else {
|
||||
tcx.implied_outlives_bounds_compat(canonicalized)
|
||||
}
|
||||
}
|
||||
|
||||
fn perform_locally_with_next_solver(
|
||||
ocx: &ObligationCtxt<'_, 'tcx>,
|
||||
key: ParamEnvAnd<'tcx, Self>,
|
||||
) -> Result<Self::QueryResponse, NoSolution> {
|
||||
compute_implied_outlives_bounds_inner(ocx, key.param_env, key.value.ty)
|
||||
if ocx.infcx.tcx.sess.opts.unstable_opts.no_implied_bounds_compat {
|
||||
compute_implied_outlives_bounds_inner(ocx, key.param_env, key.value.ty)
|
||||
} else {
|
||||
compute_implied_outlives_bounds_compat_inner(ocx, key.param_env, key.value.ty)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue