Add tests for doc attribute check

This commit is contained in:
Guillaume Gomez 2021-03-01 17:13:06 +01:00
parent b0b330f143
commit f6de1300b4
4 changed files with 38 additions and 0 deletions

View File

@ -0,0 +1,5 @@
#![crate_type = "lib"]
#![doc(as_ptr)] //~ ERROR
#[doc(as_ptr)] //~ ERROR
pub fn foo() {}

View File

@ -0,0 +1,14 @@
error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr.rs:4:7
|
LL | #[doc(as_ptr)]
| ^^^^^^
error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr.rs:2:8
|
LL | #![doc(as_ptr)]
| ^^^^^^
error: aborting due to 2 previous errors

View File

@ -0,0 +1,5 @@
#![crate_type = "lib"]
#![doc(as_ptr)] //~ ERROR
#[doc(as_ptr)] //~ ERROR
pub fn foo() {}

View File

@ -0,0 +1,14 @@
error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr.rs:4:7
|
LL | #[doc(as_ptr)]
| ^^^^^^
error: unknown `doc` attribute `as_ptr`
--> $DIR/doc-attr.rs:2:8
|
LL | #![doc(as_ptr)]
| ^^^^^^
error: aborting due to 2 previous errors