Skip to content

Commit f1698b1

Browse files
lcnrBoxyUwU
authored andcommitted
explain rigid aliases
1 parent 0c4c6d7 commit f1698b1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/solve/normalization.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ One-step normalization is implemented via `NormalizesTo` goals. Unlike other goa
1212
in the trait solver, `NormalizesTo` always expects the term to be an unconstrained
1313
inference variable[^opaques]. Think of it as a function, taking an alias as input
1414
and returning its underlying value. If the alias is rigid, `NormalizesTo` fails and
15-
returns `NoSolution`.
15+
returns `NoSolution`. This is the case for `<T as Trait>::Assoc` if there's a `T: Trait`
16+
where-bound and for opaque types with `Reveal::UserFacing` unless they are in the
17+
defining scope. We must not treat any aliases as rigid in coherence.
1618

1719
The underlying value may itself be an unnormalized alias, e.g.
1820
`NormalizesTo(<<() as Id>::This as Id>::This)` only returns `<() as Id>::This`,

0 commit comments

Comments
 (0)