fn check_predicates<'tcx>(
tcx: TyCtxt<'tcx>,
impl1_def_id: LocalDefId,
impl1_substs: SubstsRef<'tcx>,
impl2_node: Node,
impl2_substs: SubstsRef<'tcx>,
span: Span
)Expand description
Check whether predicates on the specializing impl (impl1) are allowed.
Each predicate P must be:
- global (not reference any parameters)
T: Trpredicate whereTris an always-applicable trait- on the base
impl impl2- Currently this check is done using syntactic equality, which is conservative but generally sufficient.
- a well-formed predicate of a type argument of the trait being implemented,
including the
Self-type.