You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -328,7 +294,7 @@ The available scopes are visited in the following order.
328
294
329
295
> [!NOTE]
330
296
>
331
-
> The compiler will attempt to resolve derive helpers that are used before their associated macro introduces them into scopeafter resolving derive helper candidates that are correctly in scope. This behavior is slated for removal.
297
+
> The compiler will attempt to resolve derive helpers that are used before their associated macro introduces them into scope. This scope is visited after the scope for resolving derive helper candidates that are correctly in scope. This behavior is slated for removal.
Copy file name to clipboardExpand all lines: src/names/namespaces.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -117,8 +117,18 @@ This prevents one style from shadowing another.
117
117
118
118
For example, the [`cfg` attribute] and the [`cfg` macro] are two different entities with the same name in the macro namespace, but they can still be used in their respective context.
119
119
120
+
<!-- ignore: requires external crates -->
120
121
> [!NOTE]
121
-
> For restrictions on shadowing macro sub-namespaces with [use declaration]s, see [name resolution ambiguity errors].
122
+
> `use` imports still cannot create duplicate bindings of the same name in a module or block, regardless of sub-namespace.
123
+
>
124
+
> ```rust,ignore
125
+
> #[macro_export]
126
+
> macro_rules! mymac {
127
+
> () => {};
128
+
> }
129
+
>
130
+
> use myattr::mymac; // error[E0252]: the name `mymac` is defined multiple times
0 commit comments