Skip to main content

resolve_rust_path

Function resolve_rust_path 

pub fn resolve_rust_path<S: BuildHasher>(
    importer_path: &str,
    target: &str,
    live_paths: &HashSet<String, S>,
) -> Option<String>
Expand description

Resolve a Rust use path against the live-at-HEAD set. Handles the conventional crate::foo::barsrc/foo/bar.rs | src/foo/bar/mod.rs mapping. self:: and super:: resolve relative to the importer’s module directory (see [module_dir]), which is the sibling foo/ for a non-mod.rs foo.rs; each leading super climbs one further level. External crates (anything not starting with crate::/self::/super::) return None.