mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-30 22:02:41 +01:00
When converting to a facet there are three different failure modes: 1. You provided a non-type value. Only types can convert to facets. So we tell you that we found a non-type value. 2. You provided a facet type (which has type TypeType) which does not have witnesses for the the target facet's type. So we tell you that the type `T` implements `X` but needs to implement `Y`. 2. You provided a (non-facet-type) concrete type (of type TypeType) which does not implement the target facet's type (which is a FacetType). So we tell you that we need the type to implement the FacetType but it does not. 3. You provided a FacetAccessType (which is of type TypeType also, but we special case this), whose underlying FacetType is not compatible with the target facet's type. So we tell you that we need the type to implement `X` but found a FacetAccessType `T` which implements `Y`. Closes #5027