File tree Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Expand file tree Collapse file tree 1 file changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -118,6 +118,14 @@ as other items by an `extern crate` item.
118118No ` #[macro_use] ` or ` #[macro_export] ` annotations are required.
119119
120120
121+ ## Shadowing
122+
123+ Macro names follow the same shadowing rules as other names. For example, an
124+ explicitly declared macro would shadow a glob-imported macro with the same name.
125+ Note that since macros are in a different namespace from types and values, a
126+ macro cannot shadow a type or value or vice versa.
127+
128+
121129# Drawbacks
122130[ drawbacks ] : #drawbacks
123131
@@ -167,3 +175,13 @@ for a future RFC.
167175Some day, I hope that procedural macros may be defined in the same crate in
168176which they are used. I leave the details of this for later, however, I don't
169177think this affects the design of naming - it should all Just Work.
178+
179+ ## Applying to existing macros
180+
181+ This RFC is framed in terms of a new macro system. There are various ways that
182+ some parts of it could be applied to existing macros (` macro_rules! ` ) to
183+ backwards compatibly make existing macros usable under the new naming system.
184+
185+ I want to leave this question unanswered for now. Until we get some experience
186+ implementing this feature it is unclear how much this is possible. Once we know
187+ that we can try to decide how much of that is also desirable.
You can’t perform that action at this time.
0 commit comments