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/ide/src/references.rs | |
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/ide/src/references.rs')
-rw-r--r-- | crates/ide/src/references.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ide/src/references.rs b/crates/ide/src/references.rs index 66f0f7950..675957fff 100644 --- a/crates/ide/src/references.rs +++ b/crates/ide/src/references.rs | |||
@@ -770,7 +770,7 @@ fn foo() { | |||
770 | } | 770 | } |
771 | "#, | 771 | "#, |
772 | expect![[r#" | 772 | expect![[r#" |
773 | m1 MACRO_CALL FileId(0) 0..46 29..31 Other | 773 | m1 MACRO_RULES FileId(0) 0..46 29..31 Other |
774 | 774 | ||
775 | FileId(0) 63..65 StructLiteral | 775 | FileId(0) 63..65 StructLiteral |
776 | FileId(0) 73..75 StructLiteral | 776 | FileId(0) 73..75 StructLiteral |