diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-07-18 14:21:53 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-07-18 14:21:53 +0900 |
| commit | 469935f7a46e1e3f33b2c70919c70570acaeeed7 (patch) | |
| tree | 4f213fc669f54b80fed6edafc48e1363ceab5b03 /src/test/ui/proc-macro | |
| parent | 76300d52f7707a1e30e4d9ff83d25dcbb01d8338 (diff) | |
| parent | 5c9bd9c2b4fdca00410209d4c33edc3bebc63444 (diff) | |
| download | rust-469935f7a46e1e3f33b2c70919c70570acaeeed7.tar.gz rust-469935f7a46e1e3f33b2c70919c70570acaeeed7.zip | |
Rollup merge of #86814 - Aaron1011:inner-doc-recover, r=estebank
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`. |
