Add tests for doc attribute check
This commit is contained in:
parent
b0b330f143
commit
f6de1300b4
5
src/test/rustdoc-ui/doc-attr.rs
Normal file
5
src/test/rustdoc-ui/doc-attr.rs
Normal file
@ -0,0 +1,5 @@
|
||||
#![crate_type = "lib"]
|
||||
#![doc(as_ptr)] //~ ERROR
|
||||
|
||||
#[doc(as_ptr)] //~ ERROR
|
||||
pub fn foo() {}
|
14
src/test/rustdoc-ui/doc-attr.stderr
Normal file
14
src/test/rustdoc-ui/doc-attr.stderr
Normal 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
|
||||
|
5
src/test/ui/attributes/doc-attr.rs
Normal file
5
src/test/ui/attributes/doc-attr.rs
Normal file
@ -0,0 +1,5 @@
|
||||
#![crate_type = "lib"]
|
||||
#![doc(as_ptr)] //~ ERROR
|
||||
|
||||
#[doc(as_ptr)] //~ ERROR
|
||||
pub fn foo() {}
|
14
src/test/ui/attributes/doc-attr.stderr
Normal file
14
src/test/ui/attributes/doc-attr.stderr
Normal 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user