pub fn implements_trait<'tcx>(
    cx: &LateContext<'tcx>,
    ty: Ty<'tcx>,
    trait_id: DefId,
    ty_params: &[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: