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)

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:

  1. All type parameters in Self must be "covered" by some local type constructor.
  2. Some local type must appear in Self.