rust/compiler/rustc_trait_selection/src
bors 9f0e5d963d Auto merge of #141681 - compiler-errors:fast-path-stalled, r=lcnr
Fast path for stalled obligations on self ty

If we see that the `self` type of a goal is an infer var, then don't try to compute the goal at all, since we know that it'll be forced ambiguous.

This is currently only implemented when there are no opaques in the environment. We could extend it to check that the self type is not related to any already defined opaques via subtyping, but I'll leave that as a follow-up.

---

Also stall coerce and subtype predicates if both of their vars are not resolved to concrete types.

---

~~Also, we don't care if the goal is higher-ranked for the sized and copy/clone fast path.~~ pulling this out into another PR.

r? lcnr
2025-06-06 15:20:21 +00:00
..
error_reporting Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
errors Move eager translation to a method on Diag 2025-04-16 21:38:59 -04:00
solve Fast path for subtype and coercion goals 2025-06-02 19:23:20 +00:00
traits Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
errors.rs Auto merge of #138677 - shepmaster:consistent-elided-lifetime-syntax, r=traviscross,jieyouxu 2025-06-05 19:49:30 +00:00
infer.rs Replace some Option<Span> with Span and use DUMMY_SP instead of None 2025-06-05 14:14:59 +00:00
lib.rs update cfg(bootstrap) 2025-05-12 15:33:37 +02:00
opaque_types.rs Rename unpack to kind 2025-05-27 11:14:45 +00:00
regions.rs Only use implied bounds hack if bevy, and use deeply normalize in implied bounds hack 2025-03-04 18:18:48 +00:00
solve.rs confusings 2025-04-29 18:55:21 +01:00