Skip to content

Commit

Permalink
Change some uses of macro_rules! to macro!
Browse files Browse the repository at this point in the history
  • Loading branch information
nrc committed Apr 5, 2016
1 parent 573bd83 commit ffbb2f7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions text/0000-macro-naming.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ work:
```
foo!();
macro_rules! foo { ... }
macro! foo { ... }
```

(Note, I'm using a hypothetical `macro!` defintion which I will define in a future
RFC. The reader can assume it works much like `macro_rules!`, but with the new
naming scheme).

Macro expansion order is also not defined by source order. E.g., in `foo!(); bar!();`,
`bar` may be expanded before `foo`. Ordering is only guaranteed as far as it is
necessary. E.g., if `bar` is only defined by expanding `foo`, then `foo` must be
Expand Down Expand Up @@ -148,7 +152,7 @@ of Rust, see below.
I would like that macros follow the same rules for privacy as other Rust items,
i.e., they are private by default and may be marked as `pub` to make them
public. This is not as straightforward as it sounds as it requires parsing `pub
macro_rules! foo` as a macro definition, etc. I leave this for a separate RFC.
macro! foo` as a macro definition, etc. I leave this for a separate RFC.

## Scoped attributes

Expand Down

0 comments on commit ffbb2f7

Please sign in to comment.