diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-12-15 14:45:09 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-15 14:45:09 +0000 |
commit | bd4c352831662762ee7a66da77ec9adf623b0a0a (patch) | |
tree | 725dfad20b95344ad363b35860cf7e57067bb5e5 /crates/syntax/test_data/parser/err | |
parent | 39aae835fd70d06092c1be1add6eef3984439529 (diff) | |
parent | 479babf8740a4d3cf6fc03a5f4a2fca00d387501 (diff) |
Merge #6893
6893: Move to upstream `macro_rules!` model r=matklad a=jonas-schievink
This changes `macro_rules!` from being treated as a macro invocation to being a first-class item. It also disallows using an additional ident argument for regular macros, so `m! ident(...);` now fails to parse.
This matches upstream Rust, and makes the code somewhat simpler by removing repeated "is this a `macro_rules!` call" checks. It will also simplify allowing visibilities on macros, which is currently being proposed in https://github.com/rust-lang/rust/pull/78166.
Co-authored-by: Jonas Schievink <[email protected]>
Diffstat (limited to 'crates/syntax/test_data/parser/err')
-rw-r--r-- | crates/syntax/test_data/parser/err/0002_duplicate_shebang.rast | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/crates/syntax/test_data/parser/err/0002_duplicate_shebang.rast b/crates/syntax/test_data/parser/err/0002_duplicate_shebang.rast index 4cfd1bce4..9ad5b12b8 100644 --- a/crates/syntax/test_data/parser/err/0002_duplicate_shebang.rast +++ b/crates/syntax/test_data/parser/err/0002_duplicate_shebang.rast | |||
@@ -17,14 +17,17 @@ [email protected] | |||
17 | [email protected] "bin" | 17 | [email protected] "bin" |
18 | [email protected] | 18 | [email protected] |
19 | [email protected] "/" | 19 | [email protected] "/" |
20 | MACRO_CALL@32..41 | 20 | MACRO_CALL@32..35 |
21 | [email protected] | 21 | [email protected] |
22 | [email protected] | 22 | [email protected] |
23 | [email protected] | 23 | [email protected] |
24 | [email protected] "env" | 24 | [email protected] "env" |
25 | [email protected] " " | 25 | [email protected] " " |
26 | [email protected] | 26 | [email protected] |
27 | [email protected] "rusti" | 27 | [email protected] |
28 | [email protected] | ||
29 | [email protected] | ||
30 | [email protected] "rusti" | ||
28 | [email protected] "\n" | 31 | [email protected] "\n" |
29 | error 23..23: expected `[` | 32 | error 23..23: expected `[` |
30 | error 23..23: expected an item | 33 | error 23..23: expected an item |
@@ -35,5 +38,8 @@ error 31..31: expected `{`, `[`, `(` | |||
35 | error 31..31: expected SEMICOLON | 38 | error 31..31: expected SEMICOLON |
36 | error 31..31: expected an item | 39 | error 31..31: expected an item |
37 | error 35..35: expected BANG | 40 | error 35..35: expected BANG |
41 | error 35..35: expected `{`, `[`, `(` | ||
42 | error 35..35: expected SEMICOLON | ||
43 | error 41..41: expected BANG | ||
38 | error 41..41: expected `{`, `[`, `(` | 44 | error 41..41: expected `{`, `[`, `(` |
39 | error 41..41: expected SEMICOLON | 45 | error 41..41: expected SEMICOLON |