E0433name-resolution

Failed to resolve

A path identifier doesn't resolve — usually module structure or visibility.

Repro

fn main() { std::collection::HashMap::new(); }
// E0433: use of undeclared crate or module `collection`
//        (note: did you mean `collections`?)

Why

The compiler walks each segment of the path and reports the first that doesn't exist. std::collection doesn't exist (it's collections). Other shapes: - Module not declared with mod foo;. - Sub-module path missing a re-export. - Item visible only inside the parent module.

Fix

- Read the suggestion line — rustc usually identifies the closest match. - Add the right use and let the compiler complete: use std::collections::HashMap;. - Declare missing mod foo; in the parent file. - Make the inner item visible with pub or pub(crate).

Patterns that solve this