Use DeepRejectCtxt
to quickly reject ParamEnv
candidates
This commit is contained in:
parent
717aec0f8e
commit
c51953f4d8
16 changed files with 287 additions and 167 deletions
|
@ -90,7 +90,8 @@ impl<'tcx> InherentCollect<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(simp) = simplify_type(self.tcx, self_ty, TreatParams::AsCandidateKey) {
|
||||
if let Some(simp) = simplify_type(self.tcx, self_ty, TreatParams::InstantiateWithInfer)
|
||||
{
|
||||
self.impls_map.incoherent_impls.entry(simp).or_default().push(impl_def_id);
|
||||
} else {
|
||||
bug!("unexpected self type: {:?}", self_ty);
|
||||
|
@ -129,7 +130,7 @@ impl<'tcx> InherentCollect<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
if let Some(simp) = simplify_type(self.tcx, ty, TreatParams::AsCandidateKey) {
|
||||
if let Some(simp) = simplify_type(self.tcx, ty, TreatParams::InstantiateWithInfer) {
|
||||
self.impls_map.incoherent_impls.entry(simp).or_default().push(impl_def_id);
|
||||
} else {
|
||||
bug!("unexpected primitive type: {:?}", ty);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue