We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents ce2b2ae + 6ef381d commit 137eee2Copy full SHA for 137eee2
2 files changed
crates/hir-def/src/macro_expansion_tests/mbe/matching.rs
@@ -237,3 +237,23 @@ fn test() {
237
"#]],
238
);
239
}
240
+
241
+#[test]
242
+fn meta_fat_arrow() {
243
+ check(
244
+ r#"
245
+macro_rules! m {
246
+ ( $m:meta => ) => {};
247
+}
248
249
+m! { foo => }
250
+ "#,
251
+ expect![[r#"
252
253
254
255
256
257
+ "#]],
258
+ );
259
crates/parser/src/grammar/attributes.rs
@@ -70,7 +70,7 @@ pub(super) fn meta(p: &mut Parser<'_>) {
70
paths::attr_path(p);
71
72
match p.current() {
73
- T![=] => {
+ T![=] if !p.at(T![=>]) && !p.at(T![==]) => {
74
p.bump(T![=]);
75
if expressions::expr(p).is_none() {
76
p.error("expected expression");
0 commit comments