Function rustc_lint::non_local_def::path_has_local_parent

source ยท
fn path_has_local_parent(
    path: &Path<'_>,
    cx: &LateContext<'_>,
    impl_parent: DefId,
    impl_parent_parent: Option<DefId>,
) -> bool
Expand description

Given a path and a parent impl def id, this checks if the if parent resolution def id correspond to the def id of the parent impl definition.

Given this path, we will look at the path (and ignore any generic args):

   std::convert::PartialEq<Foo<Bar>>
   ^^^^^^^^^^^^^^^^^^^^^^^