rust/compiler/rustc_next_trait_solver/src
Matthias Krüger 9e0be6c15b
Rollup merge of #139900 - lcnr:normalizes-to-where-bounds-unproductive, r=compiler-errors
stepping into impls for normalization is unproductive

See the inline comment. This builds on the reasoning from #136824 (https://gist.github.com/lcnr/c49d887bbd34f5d05c36d1cf7a1bf5a5). Fixes https://github.com/rust-lang/trait-system-refactor-initiative/issues/176.

Looking at the end of the gist:
> The only ways to project out of a constructor are the following:
> - accessing an associated item, either its type or its item bounds
> - accessing super predicates

Detecting cases where we accessing the type of an associated item is easy, it's simply when we normalize. I don't yet know how to detect whether we step out of an impl by accessing item bounds. Once we also detect these cases we should be able to soundly support arbitrary coinductive traits. Luckily this does not matter for this PR :>

r? `@compiler-errors` cc `@nikomatsakis`
2025-04-17 00:16:24 +02:00
..
solve Rollup merge of #139900 - lcnr:normalizes-to-where-bounds-unproductive, r=compiler-errors 2025-04-17 00:16:24 +02:00
canonicalizer.rs Fold visit into ty 2025-03-15 06:34:36 +00:00
coherence.rs Do not rely on type_var_origin in OrphanCheckErr::NonLocalInputType 2025-03-20 02:17:14 +00:00
delegate.rs simplify Interner opaque types API 2025-04-01 23:24:28 +02:00
lib.rs update cfgs 2025-04-09 12:29:59 +01:00
resolve.rs Fold visit into ty 2025-03-15 06:34:36 +00:00