-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recover from a misplaced inner doc comment
Fixes #86781
- Loading branch information
Showing
3 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// aux-build:test-macros.rs | ||
|
||
#[macro_use] | ||
extern crate test_macros; | ||
|
||
//! Inner doc comment | ||
//~^ ERROR expected outer doc comment | ||
#[derive(Empty)] | ||
pub struct Foo; | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
error[E0753]: expected outer doc comment | ||
--> $DIR/issue-86781-bad-inner-doc.rs:6:1 | ||
| | ||
LL | //! Inner doc comment | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: inner doc comments like this (starting with `//!` or `/*!`) can only appear before items | ||
|
||
error: aborting due to previous error | ||
|
||
For more information about this error, try `rustc --explain E0753`. |