From 4bc789b5b1fbbbf1d448abcdd17970e97ae70c28 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 23 Oct 2025 12:23:30 -0700 Subject: [PATCH] Add a regression test for rust-lang/rust#147971 (cherry picked from commit a81ed52f5830b6a305ad8e8547196744d460afa0) --- library/std/tests/ambiguous-hash_map.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 library/std/tests/ambiguous-hash_map.rs diff --git a/library/std/tests/ambiguous-hash_map.rs b/library/std/tests/ambiguous-hash_map.rs new file mode 100644 index 000000000000..bd5ae5a8957b --- /dev/null +++ b/library/std/tests/ambiguous-hash_map.rs @@ -0,0 +1,17 @@ +//! Make sure that a `std` macro `hash_map!` does not cause ambiguity +//! with a local glob import with the same name. +//! +//! See regression https://github.com/rust-lang/rust/issues/147971 + +mod module { + macro_rules! hash_map { + () => {}; + } + pub(crate) use hash_map; +} + +use module::*; + +fn main() { + hash_map! {} +}