Function rustc::traits::orphan_check
[−]
[src]
pub fn orphan_check<'a, 'gcx, 'tcx>(
tcx: TyCtxt<'a, 'gcx, 'tcx>,
impl_def_id: DefId
) -> Result<(), OrphanCheckErr<'tcx>>
🔬 This is a nightly-only experimental API. (rustc_private
)
this crate is being loaded from the sysroot, an unstable location; did you mean to load this crate from crates.io via Cargo.toml
instead?
Checks the coherence orphan rules. impl_def_id
should be the
def-id 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
.