-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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 #130931 - GuillaumeGomez:standalone-crate, r=notriddle
Rename `standalone` doctest attribute into `standalone_crate` Following [zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/266220-t-rustdoc/topic/Renaming.20code.20block.20.22standalone.22.20attribute.3F) and poll results. r? `@notriddle`
- Loading branch information
Showing
12 changed files
with
165 additions
and
98 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
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,16 @@ | ||
// This test checks that it will output warnings for usage of `standalone` or `standalone_crate`. | ||
|
||
//@ compile-flags:--test -Zunstable-options --edition 2024 | ||
//@ normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR" | ||
//@ normalize-stdout-test: "finished in \d+\.\d+s" -> "finished in $$TIME" | ||
//@ normalize-stdout-test: ".rs:\d+:\d+" -> ".rs:$$LINE:$$COL" | ||
|
||
#![deny(warnings)] | ||
|
||
//! ```standalone | ||
//! bla | ||
//! ``` | ||
//! | ||
//! ```standalone-crate | ||
//! bla | ||
//! ``` |
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,38 @@ | ||
error: unknown attribute `standalone` | ||
--> $DIR/standalone-warning-2024.rs:10:1 | ||
| | ||
10 | / //! ```standalone | ||
11 | | //! bla | ||
12 | | //! ``` | ||
13 | | //! | ||
14 | | //! ```standalone-crate | ||
15 | | //! bla | ||
16 | | //! ``` | ||
| |_______^ | ||
| | ||
= help: use `standalone_crate` to compile this code block separately | ||
= help: this code block may be skipped during testing, because unknown attributes are treated as markers for code samples written in other programming languages, unless it is also explicitly marked as `rust` | ||
note: the lint level is defined here | ||
--> $DIR/standalone-warning-2024.rs:8:9 | ||
| | ||
8 | #![deny(warnings)] | ||
| ^^^^^^^^ | ||
= note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(warnings)]` | ||
|
||
error: unknown attribute `standalone-crate` | ||
--> $DIR/standalone-warning-2024.rs:10:1 | ||
| | ||
10 | / //! ```standalone | ||
11 | | //! bla | ||
12 | | //! ``` | ||
13 | | //! | ||
14 | | //! ```standalone-crate | ||
15 | | //! bla | ||
16 | | //! ``` | ||
| |_______^ | ||
| | ||
= help: use `standalone_crate` to compile this code block separately | ||
= help: this code block may be skipped during testing, because unknown attributes are treated as markers for code samples written in other programming languages, unless it is also explicitly marked as `rust` | ||
|
||
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,10 @@ | ||
// This test checks that it will not output warning for usage of `standalone` or `standalone_crate`. | ||
//@ check-pass | ||
|
||
//! ```standalone | ||
//! bla | ||
//! ``` | ||
//! | ||
//! ```standalone-crate | ||
//! bla | ||
//! ``` |
Oops, something went wrong.