mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 01:04:03 +00:00
Add test for #[doc(alias = "...")] at crate level
This commit is contained in:
parent
0e68e1ba5c
commit
5c836e3207
3
src/test/rustdoc-ui/doc-alias-crate-level.rs
Normal file
3
src/test/rustdoc-ui/doc-alias-crate-level.rs
Normal file
@ -0,0 +1,3 @@
|
||||
#![feature(doc_alias)]
|
||||
|
||||
#![doc(alias = "shouldn't work!")] //~ ERROR
|
8
src/test/rustdoc-ui/doc-alias-crate-level.stderr
Normal file
8
src/test/rustdoc-ui/doc-alias-crate-level.stderr
Normal 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
|
||||
|
5
src/test/ui/doc-alias-crate-level.rs
Normal file
5
src/test/ui/doc-alias-crate-level.rs
Normal file
@ -0,0 +1,5 @@
|
||||
#![feature(doc_alias)]
|
||||
|
||||
#![crate_type = "lib"]
|
||||
|
||||
#![doc(alias = "shouldn't work!")] //~ ERROR
|
8
src/test/ui/doc-alias-crate-level.stderr
Normal file
8
src/test/ui/doc-alias-crate-level.stderr
Normal 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
|
||||
|
Loading…
Reference in New Issue
Block a user