Auto merge of #97024 - lcnr:simplify_type-sus, r=<try>
`simplify_type` improvements and cursed docs the existing `TreatParams` enum pretty much mixes everything up. Not sure why this looked right to me in #94057 This also includes two changes which impact perf: - `ty::Projection` with inference vars shouldn't be treated as a rigid type, even if fully normalized - `ty::Placeholder` only unifies with itself, so actually return `Some` for them r? `@nikomatsakis`
This commit is contained in:
commit
c067287049
9 changed files with 63 additions and 86 deletions
|
@ -88,8 +88,8 @@ where
|
|||
impl2_ref.iter().flat_map(|tref| tref.substs.types()),
|
||||
)
|
||||
.any(|(ty1, ty2)| {
|
||||
let t1 = fast_reject::simplify_type(tcx, ty1, TreatParams::AsPlaceholders);
|
||||
let t2 = fast_reject::simplify_type(tcx, ty2, TreatParams::AsPlaceholders);
|
||||
let t1 = fast_reject::simplify_type(tcx, ty1, TreatParams::AsInfer);
|
||||
let t2 = fast_reject::simplify_type(tcx, ty2, TreatParams::AsInfer);
|
||||
|
||||
if let (Some(t1), Some(t2)) = (t1, t2) {
|
||||
// Simplified successfully
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue