From d4293ffcb34b17af42815b1669aeec50e9cf50b8 Mon Sep 17 00:00:00 2001 From: Guillaume Gomez Date: Sat, 7 Aug 2021 14:49:34 +0200 Subject: [PATCH] Move working checks into separate test files --- src/test/rustdoc-ui/doc-test-attr-pass.rs | 8 ++++++++ src/test/rustdoc-ui/doc-test-attr.rs | 2 -- src/test/ui/rustdoc/doc-test-attr-pass.rs | 9 +++++++++ src/test/ui/rustdoc/doc-test-attr.rs | 2 -- 4 files changed, 17 insertions(+), 4 deletions(-) create mode 100644 src/test/rustdoc-ui/doc-test-attr-pass.rs create mode 100644 src/test/ui/rustdoc/doc-test-attr-pass.rs diff --git a/src/test/rustdoc-ui/doc-test-attr-pass.rs b/src/test/rustdoc-ui/doc-test-attr-pass.rs new file mode 100644 index 0000000000000..12608f2445075 --- /dev/null +++ b/src/test/rustdoc-ui/doc-test-attr-pass.rs @@ -0,0 +1,8 @@ +// check-pass + +#![crate_type = "lib"] +#![deny(invalid_doc_attributes)] +#![doc(test(no_crate_inject))] +#![doc(test(attr(deny(warnings))))] + +pub fn foo() {} diff --git a/src/test/rustdoc-ui/doc-test-attr.rs b/src/test/rustdoc-ui/doc-test-attr.rs index 69288d3adb4f8..46178ad865a4c 100644 --- a/src/test/rustdoc-ui/doc-test-attr.rs +++ b/src/test/rustdoc-ui/doc-test-attr.rs @@ -10,7 +10,5 @@ #![doc(test(a))] //~^ ERROR unknown `doc(test)` attribute `a` //~^^ WARN this was previously accepted by the compiler -#![doc(test(no_crate_inject))] -#![doc(test(attr(deny(warnings))))] pub fn foo() {} diff --git a/src/test/ui/rustdoc/doc-test-attr-pass.rs b/src/test/ui/rustdoc/doc-test-attr-pass.rs new file mode 100644 index 0000000000000..7884addd15fe7 --- /dev/null +++ b/src/test/ui/rustdoc/doc-test-attr-pass.rs @@ -0,0 +1,9 @@ +// check-pass + +#![crate_type = "lib"] +#![deny(invalid_doc_attributes)] +#![doc(test(no_crate_inject))] +#![doc(test(attr(deny(warnings))))] +#![doc(test())] + +pub fn foo() {} diff --git a/src/test/ui/rustdoc/doc-test-attr.rs b/src/test/ui/rustdoc/doc-test-attr.rs index 69288d3adb4f8..46178ad865a4c 100644 --- a/src/test/ui/rustdoc/doc-test-attr.rs +++ b/src/test/ui/rustdoc/doc-test-attr.rs @@ -10,7 +10,5 @@ #![doc(test(a))] //~^ ERROR unknown `doc(test)` attribute `a` //~^^ WARN this was previously accepted by the compiler -#![doc(test(no_crate_inject))] -#![doc(test(attr(deny(warnings))))] pub fn foo() {}