Function rustc_trait_selection::traits::orphan_check
source · pub fn orphan_check(
tcx: TyCtxt<'_>,
impl_def_id: DefId
) -> Result<(), OrphanCheckErr<'_>>
Expand description
Checks the coherence orphan rules. impl_def_id
should be the
DefId
of a trait impl. To pass, either the trait must be local, or else
two conditions must be satisfied:
- All type parameters in
Self
must be “covered” by some local type constructor. - Some local type must appear in
Self
.