pub fn trait_ref_of_method<'tcx>(
cx: &LateContext<'tcx>,
owner: OwnerId,
) -> Option<&'tcx TraitRef<'tcx>>Expand description
Gets the hir::TraitRef of the trait the given method is implemented for.
Use this if you want to find the TraitRef of the Add trait in this example:
struct Point(isize, isize);
impl std::ops::Add for Point {
type Output = Self;
fn add(self, other: Self) -> Self {
Point(0, 0)
}
}