diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2021-06-06 19:11:24 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-06 19:11:24 +0900 |
| commit | 19433c44bde0dd6ed674bd03f1cefbfc2f95c676 (patch) | |
| tree | 0321b1e5b1d8b8175b6f59613de38cb524eade38 /src/test | |
| parent | 2f0a8556a9add078c3ecc9d748e9ec820817fd42 (diff) | |
| parent | b8ebf4431e48abe6f1844b80416c11f7b0ccab0c (diff) | |
| download | rust-19433c44bde0dd6ed674bd03f1cefbfc2f95c676.tar.gz rust-19433c44bde0dd6ed674bd03f1cefbfc2f95c676.zip | |
Rollup merge of #86047 - jyn514:doc-attrs, r=petrochenkov
Don't fire `invalid_doc_attributes` on `extern crate` items Fixes https://github.com/rust-lang/rust/issues/86046.
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/ui/rustdoc/doc-inline-extern-crate.rs | 9 | ||||
| -rw-r--r-- | src/test/ui/rustdoc/doc-inline-extern-crate.stderr | 13 |
2 files changed, 22 insertions, 0 deletions
diff --git a/src/test/ui/rustdoc/doc-inline-extern-crate.rs b/src/test/ui/rustdoc/doc-inline-extern-crate.rs new file mode 100644 index 00000000000..0eb4c149060 --- /dev/null +++ b/src/test/ui/rustdoc/doc-inline-extern-crate.rs @@ -0,0 +1,9 @@ +#[doc(inline)] +//~^ ERROR conflicting +#[doc(no_inline)] +pub extern crate core; + +// no warning +pub extern crate alloc; + +fn main() {} diff --git a/src/test/ui/rustdoc/doc-inline-extern-crate.stderr b/src/test/ui/rustdoc/doc-inline-extern-crate.stderr new file mode 100644 index 00000000000..41518295b12 --- /dev/null +++ b/src/test/ui/rustdoc/doc-inline-extern-crate.stderr @@ -0,0 +1,13 @@ +error: conflicting doc inlining attributes + --> $DIR/doc-inline-extern-crate.rs:1:7 + | +LL | #[doc(inline)] + | ^^^^^^ this attribute... +LL | +LL | #[doc(no_inline)] + | ^^^^^^^^^ ...conflicts with this attribute + | + = help: remove one of the conflicting attributes + +error: aborting due to previous error + |
