Add test for #[doc(alias = "...")] at crate level

This commit is contained in:
Guillaume Gomez 2020-09-04 17:13:08 +02:00
parent 0e68e1ba5c
commit 5c836e3207
4 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,3 @@
#![feature(doc_alias)]
#![doc(alias = "shouldn't work!")] //~ ERROR

View File

@ -0,0 +1,8 @@
error: `#![doc(alias = "...")]` isn't allowed as a crate level attribute
--> $DIR/doc-alias-crate-level.rs:3:8
|
LL | #![doc(alias = "shouldn't work!")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error

View File

@ -0,0 +1,5 @@
#![feature(doc_alias)]
#![crate_type = "lib"]
#![doc(alias = "shouldn't work!")] //~ ERROR

View File

@ -0,0 +1,8 @@
error: `#![doc(alias = "...")]` isn't allowed as a crate level attribute
--> $DIR/doc-alias-crate-level.rs:5:8
|
LL | #![doc(alias = "shouldn't work!")]
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error