Move working checks into separate test files

This commit is contained in:
Guillaume Gomez 2021-08-07 14:49:34 +02:00
parent 4ba54ff60b
commit d4293ffcb3
4 changed files with 17 additions and 4 deletions

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}

View File

@ -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() {}