resolve_path_to_modules

Function resolve_path_to_modules 

Source
fn resolve_path_to_modules(
    db: &dyn HirDatabase,
    path_filter: &[String],
    anchor_to_crate: bool,
    case_sensitive: bool,
) -> Vec<Module>
Expand description

Resolve a path filter to the target module(s) it points to. Returns the modules whose symbol indices should be searched.

The path_filter contains segments like [“std”, “vec”] for a query like “std::vec::Vec”. We resolve this by:

  1. Finding crates matching the first segment
  2. Walking down the module tree following subsequent segments