E0252name-resolution

Name is imported twice

Two `use` statements bring the same name into scope.

Repro

use std::fmt::Result;
use std::io::Result;   // E0252: `Result` is already imported

Why

Both imports try to introduce the same identifier. The compiler can't pick one; you'd be ambiguous at every use.

Fix

- Rename one with as: use std::io::Result as IoResult;. - Use full paths at the call site for the less common one: std::io::Result<T>. - Drop the duplicate if you actually only use one. - For prelude clashes, prefer the more specific import — std types often share names with crate-defined ones.

Patterns that solve this