]>
Commit | Line | Data |
---|---|---|
064997fb FG |
1 | fn inner() { |
2 | #![doc("Inner attributes allowed here")] | |
3 | //! As are ModuleDoc style comments | |
4 | { | |
5 | #![doc("Inner attributes are allowed in blocks used as statements")] | |
fe692bf9 | 6 | #![doc("Being validated is not affected by duplicates")] |
064997fb FG |
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 | fn outer() { | |
16 | let _ = #[doc("Outer attributes are always allowed")] {}; | |
17 | } | |
18 | ||
19 | // https://github.com/rust-lang/rust-analyzer/issues/689 | |
20 | impl Whatever { | |
21 | fn salsa_event(&self, event_fn: impl Fn() -> Event<Self>) { | |
22 | #![allow(unused_variables)] // this is `inner_attr` of the block | |
23 | } | |
24 | } |