forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#76329 - GuillaumeGomez:doc-alias-crate-leve…
…l, r=matthewjasper Add check for doc alias attribute at crate level Fixes rust-lang#76298, rust-lang#64734, rust-lang#69365. r? @ollie27
- Loading branch information
Showing
14 changed files
with
547 additions
and
404 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#![feature(doc_alias)] | ||
|
||
#![doc(alias = "crate-level-not-working")] //~ ERROR | ||
|
||
#[doc(alias = "shouldn't work!")] //~ ERROR | ||
pub fn foo() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
error: '\'' character isn't allowed in `#[doc(alias = "...")]` | ||
--> $DIR/doc-alias-crate-level.rs:5:7 | ||
| | ||
LL | #[doc(alias = "shouldn't work!")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: `#![doc(alias = "...")]` isn't allowed as a crate level attribute | ||
--> $DIR/doc-alias-crate-level.rs:3:8 | ||
| | ||
LL | #![doc(alias = "crate-level-not-working")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 2 previous errors | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// compile-flags: -Zdeduplicate-diagnostics=no | ||
|
||
#![feature(doc_alias)] | ||
|
||
#![crate_type = "lib"] | ||
|
||
#![doc(alias = "shouldn't work!")] //~ ERROR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
error: '\'' character isn't allowed in `#[doc(alias = "...")]` | ||
--> $DIR/doc-alias-crate-level.rs:7:8 | ||
| | ||
LL | #![doc(alias = "shouldn't work!")] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
|
||
error: aborting due to previous error | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.