diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-24 10:51:25 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-24 10:51:25 +0100 |
commit | 0194adb651257b69fdf04423b22c69db09fc489c (patch) | |
tree | 2353f8f068962313d0b2748aab58b71c4ca456d2 /crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs | |
parent | bf3030404ef8a161334326bad706f60ee8838f63 (diff) | |
parent | 459241f272748ff2e57b2c7e84f5a04f78d67edb (diff) |
Merge #1585
1585: move syntax tests to unit tests r=matklad a=matklad
Co-authored-by: Aleksey Kladov <[email protected]>
Diffstat (limited to 'crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs')
-rw-r--r-- | crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs new file mode 100644 index 000000000..88df8138e --- /dev/null +++ b/crates/ra_syntax/test_data/parser/ok/0045_block_inner_attrs.rs | |||
@@ -0,0 +1,20 @@ | |||
1 | fn block() { | ||
2 | #![doc("Inner attributes allowed here")] | ||
3 | //! As are ModuleDoc style comments | ||
4 | { | ||
5 | #![doc("Inner attributes are allowed in blocks used as statements")] | ||
6 | #![doc("Being validated is not affected by duplcates")] | ||
7 | //! As are ModuleDoc style comments | ||
8 | }; | ||
9 | { | ||
10 | #![doc("Inner attributes are allowed in blocks when they are the last statement of another block")] | ||
11 | //! As are ModuleDoc style comments | ||
12 | } | ||
13 | } | ||
14 | |||
15 | // https://github.com/rust-analyzer/rust-analyzer/issues/689 | ||
16 | impl Whatever { | ||
17 | fn salsa_event(&self, event_fn: impl Fn() -> Event<Self>) { | ||
18 | #![allow(unused_variables)] // this is `inner_attr` of the block | ||
19 | } | ||
20 | } | ||