pub fn implements_trait<'tcx>(
    cx: &LateContext<'tcx>,
    ty: Ty<'tcx>,
    trait_id: DefId,
    args: &[GenericArg<'tcx>]
) -> bool
Expand description

Checks whether a type implements a trait. The function returns false in case the type contains an inference variable.

See: