clippy_utils

Function get_trait_def_id

source
pub fn get_trait_def_id(tcx: TyCtxt<'_>, path: &[&str]) -> Option<DefId>
Expand description

Convenience function to get the DefId of a trait by path. It could be a trait or trait alias.

This function is expensive and should be used sparingly.