Skip to content

Commit 127e560

Browse files
committed
Remove ambiguity error removed in Rust 1.72.
This was changed in rust-lang/rust#56414 to favor in-scope items.
1 parent 30d7bfc commit 127e560

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/items/use-declarations.md

-12
Original file line numberDiff line numberDiff line change
@@ -380,18 +380,6 @@ pub use bar::*;
380380
# fn main() {}
381381
```
382382

383-
If an in-scope item has the same name as a crate name in the [extern prelude], then `use` of that crate name requires a leading `::` to unambiguously select the crate name or `crate::` to use the item from the crate root.
384-
385-
```rust,compile_fail
386-
use std::fs; // Error, this is ambiguous.
387-
388-
mod std {
389-
pub mod fs {}
390-
}
391-
# fn main() {}
392-
```
393-
394-
395383
[_SimplePath_]: ../paths.md#simple-paths
396384
[`extern crate`]: extern-crates.md
397385
[`macro_rules`]: ../macros-by-example.md

0 commit comments

Comments
 (0)