diff options
| author | Aaron Hill <aa1ronham@gmail.com> | 2021-07-02 11:30:20 -0500 |
|---|---|---|
| committer | Aaron Hill <aa1ronham@gmail.com> | 2021-07-02 11:47:26 -0500 |
| commit | 5c9bd9c2b4fdca00410209d4c33edc3bebc63444 (patch) | |
| tree | df283d8bd21a2bc33179900018f4cd02f3648193 /src/test/ui/proc-macro | |
| parent | f9fa13f705bb8b1c57c6b6fe95055ec4995a40f0 (diff) | |
| download | rust-5c9bd9c2b4fdca00410209d4c33edc3bebc63444.tar.gz rust-5c9bd9c2b4fdca00410209d4c33edc3bebc63444.zip | |
Recover from a misplaced inner doc comment
Fixes #86781
Diffstat (limited to 'src/test/ui/proc-macro')
| -rw-r--r-- | src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs | 11 | ||||
| -rw-r--r-- | src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr | 11 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs b/src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs new file mode 100644 index 00000000000..8be1ae77738 --- /dev/null +++ b/src/test/ui/proc-macro/issue-86781-bad-inner-doc.rs @@ -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() {} diff --git a/src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr b/src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr new file mode 100644 index 00000000000..0b2e612ee5b --- /dev/null +++ b/src/test/ui/proc-macro/issue-86781-bad-inner-doc.stderr @@ -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`. |
