File tree Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Expand file tree Collapse file tree 3 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -295,6 +295,33 @@ named `file_that_doesnt_exist.rs` or `file_that_doesnt_exist/mod.rs` in the
295295same directory.
296296"## ,
297297
298+ E0584 : r##"
299+ A doc comment that is not attached to anything has been encountered.
300+
301+ Erroneous code example:
302+
303+ ```compile_fail,E0584
304+ trait Island {
305+ fn lost();
306+
307+ /// I'm lost!
308+ }
309+ ```
310+
311+ A little reminder: a doc comment has to be placed before the item it's supposed
312+ to document. So if you want to document the `Island` trait, you need to put a
313+ doc comment before it, not inside it. Same goes for the `lost` method: the doc
314+ comment needs to be before it:
315+
316+ ```
317+ /// I'm THE island!
318+ trait Island {
319+ /// I'm lost!
320+ fn lost();
321+ }
322+ ```
323+ "## ,
324+
298325E0585 : r##"
299326A documentation comment that doesn't document anything was found.
300327
@@ -494,7 +521,6 @@ features in the `-Z allow_features` flag.
494521 E0549 ,
495522 E0553 , // multiple rustc_const_unstable attributes
496523// E0555, // replaced with a generic attribute input check
497- E0584 , // file for module `..` found at both .. and ..
498524 E0629 , // missing 'feature' (rustc_const_unstable)
499525 // rustc_const_unstable attribute must be paired with stable/unstable
500526 // attribute
Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ LL | mod mod_file_disambig_aux;
88
99error: aborting due to previous error
1010
11+ For more information about this error, try `rustc --explain E0584`.
Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ LL | /// empty doc
88
99error: aborting due to previous error
1010
11+ For more information about this error, try `rustc --explain E0584`.
You can’t perform that action at this time.
0 commit comments