diff options
author | pcpthm <[email protected]> | 2019-03-19 08:24:02 +0000 |
---|---|---|
committer | pcpthm <[email protected]> | 2019-03-19 08:24:02 +0000 |
commit | ffed132e52964f029a586a3efd4afc879ed39c59 (patch) | |
tree | d385c3239f92995bf56db209ab2464b50aa033d0 /crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs | |
parent | 1cd18f9237b6ac48ca8461307f2a4eaf273ee394 (diff) |
Allow attributes on top level expression
A top level expression is either
- a expression statement or
- the last expression in a block
Diffstat (limited to 'crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs')
-rw-r--r-- | crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs b/crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs new file mode 100644 index 000000000..b28c078f9 --- /dev/null +++ b/crates/ra_syntax/tests/data/parser/inline/ok/0126_attr_on_expr_stmt.rs | |||
@@ -0,0 +1,6 @@ | |||
1 | fn foo() { | ||
2 | #[A] foo(); | ||
3 | #[B] bar!{} | ||
4 | #[C] #[D] {} | ||
5 | #[D] return (); | ||
6 | } | ||