From 9b582d6201d1b36dc198913b035aa5591332422f Mon Sep 17 00:00:00 2001 From: Tiger0202 Date: Sun, 30 Jun 2024 10:24:58 -0700 Subject: [PATCH] Remove ambiguity error removed in Rust 1.72. This was changed in https://github.com/rust-lang/rust/issues/56414 to favor in-scope items. --- src/items/use-declarations.md | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/items/use-declarations.md b/src/items/use-declarations.md index 9964ca3..c17c6f0 100644 --- a/src/items/use-declarations.md +++ b/src/items/use-declarations.md @@ -380,18 +380,6 @@ pub use bar::*; # fn main() {} ``` -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. - -```rust,compile_fail -use std::fs; // Error, this is ambiguous. - -mod std { - pub mod fs {} -} -# fn main() {} -``` - - [_SimplePath_]: ../paths.md#simple-paths [`extern crate`]: extern-crates.md [`macro_rules`]: ../macros-by-example.md