]>
Commit | Line | Data |
---|---|---|
c295e0f8 XL |
1 | // run-rustfix |
2 | #![allow(unused)] | |
3 | fn foo() { } | |
4 | ||
5 | /// Misplaced comment... | |
6 | //~^ ERROR expected outer doc comment | |
7 | fn bar() { } //~ NOTE the inner doc comment doesn't annotate this function | |
8 | ||
9 | #[test] //~ ERROR an inner attribute is not permitted in this context | |
10 | fn baz() { } //~ NOTE the inner attribute doesn't annotate this function | |
11 | //~^^ NOTE inner attributes, like `#![no_std]`, annotate the item enclosing them, and are usually | |
12 | ||
13 | /** Misplaced comment... */ | |
14 | //~^ ERROR expected outer doc comment | |
15 | fn bat() { } //~ NOTE the inner doc comment doesn't annotate this function | |
16 | ||
17 | fn main() { } | |
18 | ||
19 | // Misplaced comment... | |
20 | //~^ ERROR expected outer doc comment | |
21 | //~| NOTE inner doc comments like this (starting with `//!` or `/*!`) can only appear before items | |
22 | //~| NOTE other attributes here | |
23 | /* Misplaced comment... */ | |
24 | //~^ ERROR expected outer doc comment | |
25 | //~| NOTE this doc comment doesn't document anything | |
26 | //~| ERROR expected item after doc comment | |
27 | //~| NOTE inner doc comments like this (starting with `//!` or `/*!`) can only appear before items |