def_path_def_ids

Function def_path_def_ids 

Source
pub fn def_path_def_ids<'a, 'tcx>(
    s: &impl BaseState<'tcx>,
    pat: &'a NamePattern,
) -> Result<Vec<DefId>>
Expand description

Find the items corresponding to a given pattern. This mostly ignores generics.

Can return multiple resolutions when there are multiple versions of the same crate, e.g. memchr::memchr could return the functions from both memchr 1.0 and memchr 2.0.

Also returns multiple results when there are multiple paths under the same name e.g. std::vec would have both a [hax::DefKind::Mod] and [hax::DefKind::Macro].

This function is expensive and should be used sparingly.

If the path does not correspond to an existing item, return the first subpath that doesn’t correspond to an item.