fn predicate_def_id<'tcx>(predicate: ty::Predicate<'tcx>) -> Option<DefId> {
        match predicate {
            ty::Predicate::Trait(predicate) => Some(predicate.def_id()),

            ty::Predicate::Projection(projection) => Some(projection.item_def_id()),

            ty::Predicate::WellFormed(..)
            | ty::Predicate::RegionOutlives(..)
            | ty::Predicate::TypeOutlives(..)
            | ty::Predicate::ObjectSafe(..)
            | ty::Predicate::ClosureKind(..)
            | ty::Predicate::Subtype(..)
            | ty::Predicate::ConstEvaluatable(..) => None,
        }
    }
/// Given that `predicate` is in the environment, returns the
/// def-id of something (e.g., a trait, associated item, etc)
/// whose predicates can also be assumed to be true. We will
/// compute the transitive closure of such things.
Given that `predicate` is in the environment, returns the
def-id of something
whose predicates can also be assumed to be true. We will
compute the transitive closure of such things.
Given that ` predicate ` is in the environment returns the def - id of something whose predicates can also be assumed to be true . We will compute the transitive closure of such things .
fn predicate_def_id<'tcx>(predicate: ty::Predicate<'tcx>) -> Option<DefId> {
        match predicate {
            ty::Predicate::Trait(predicate) => Some(predicate.def_id()),
            ty::Predicate::Projection(projection) => Some(projection.item_def_id()),
            ty::Predicate::WellFormed(..)
            | ty::Predicate::RegionOutlives(..)
            | ty::Predicate::TypeOutlives(..)
            | ty::Predicate::ObjectSafe(..)
            | ty::Predicate::ClosureKind(..)
            | ty::Predicate::Subtype(..)
            | ty::Predicate::ConstEvaluatable(..) => None,
        }
    }
fn predicate_def_id < ' tcx > ( predicate : ty :: Predicate < ' tcx > ) -> Option < DefId > { match predicate { ty :: Predicate :: Trait ( predicate ) => Some ( predicate . def_id ( ) ) , ty :: Predicate :: Projection ( projection ) => Some ( projection . item_def_id ( ) ) , ty :: Predicate :: WellFormed ( .. ) | ty :: Predicate :: RegionOutlives ( .. ) | ty :: Predicate :: TypeOutlives ( .. ) | ty :: Predicate :: ObjectSafe ( .. ) | ty :: Predicate :: ClosureKind ( .. ) | ty :: Predicate :: Subtype ( .. ) | ty :: Predicate :: ConstEvaluatable ( .. ) => None , } }
Given that `predicate` is in the environment, returns the
def-id of something (e.g., a trait, associated item, etc)
whose predicates can also be assumed to be true.
Given that ` predicate ` is in the environment returns the def - id of something ( e . g . a trait associated item etc ) whose predicates can also be assumed to be true .
predicate
ty::Predicate<'tcx>