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 one of:
- Global (not reference any parameters).
- A
T: Tr
predicate whereTr
is an always-applicable trait. - Present on the base impl
impl2
.- This check is done using the
trait_predicates_eq
function below.
- This check is done using the
- A well-formed predicate of a type argument of the trait being implemented,
including the
Self
-type.