File tree 3 files changed +29
-1
lines changed
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
295
295
same directory.
296
296
"## ,
297
297
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
+
298
325
E0585 : r##"
299
326
A documentation comment that doesn't document anything was found.
300
327
@@ -494,7 +521,6 @@ features in the `-Z allow_features` flag.
494
521
E0549 ,
495
522
E0553 , // multiple rustc_const_unstable attributes
496
523
// E0555, // replaced with a generic attribute input check
497
- E0584 , // file for module `..` found at both .. and ..
498
524
E0629 , // missing 'feature' (rustc_const_unstable)
499
525
// rustc_const_unstable attribute must be paired with stable/unstable
500
526
// attribute
Original file line number Diff line number Diff line change @@ -8,3 +8,4 @@ LL | mod mod_file_disambig_aux;
8
8
9
9
error: aborting due to previous error
10
10
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
8
8
9
9
error: aborting due to previous error
10
10
11
+ For more information about this error, try `rustc --explain E0584`.
You can’t perform that action at this time.
0 commit comments