Function clippy_utils::ty::get_associated_type
source · pub fn get_associated_type<'tcx>(
cx: &LateContext<'tcx>,
ty: Ty<'tcx>,
trait_id: DefId,
name: &str
) -> Option<Ty<'tcx>>Expand description
Returns the associated type name for ty as an implementation of trait_id.
Do not invoke without first verifying that the type implements the trait.