Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/parser/src/grammar/expressions/atom.rs')
-rw-r--r--crates/parser/src/grammar/expressions/atom.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/crates/parser/src/grammar/expressions/atom.rs b/crates/parser/src/grammar/expressions/atom.rs
index 3214fd90f2..3620a27c23 100644
--- a/crates/parser/src/grammar/expressions/atom.rs
+++ b/crates/parser/src/grammar/expressions/atom.rs
@@ -888,6 +888,10 @@ fn return_expr(p: &mut Parser<'_>) -> CompletedMarker {
let m = p.start();
p.bump(T![return]);
if p.at_ts(EXPR_FIRST) {
+ // test return_attr
+ // fn foo() {
+ // return #[attr] 1;
+ // }
expr(p);
}
m.complete(p, RETURN_EXPR)