Function rustc_next_trait_solver::coherence::trait_ref_is_knowable
source ยท pub fn trait_ref_is_knowable<Infcx, I, E>(
infcx: &Infcx,
trait_ref: TraitRef<I>,
lazily_normalize_ty: impl FnMut(I::Ty) -> Result<I::Ty, E>,
) -> Result<Result<(), Conflict>, E>
Expand description
Returns whether all impls which would apply to the trait_ref
e.g. Ty: Trait<Arg>
are already known in the local crate.
This both checks whether any downstream or sibling crates could implement it and whether an upstream crate can add this impl without breaking backwards compatibility.