summaryrefslogtreecommitdiffstats
path: root/src/test/rustdoc-ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/rustdoc-ui')
-rw-r--r--src/test/rustdoc-ui/bare-urls.stderr2
-rw-r--r--src/test/rustdoc-ui/check-attr-test.stderr2
-rw-r--r--src/test/rustdoc-ui/check-attr.stderr2
-rw-r--r--src/test/rustdoc-ui/check-cfg-test.stderr2
-rw-r--r--src/test/rustdoc-ui/check-fail.stderr2
-rw-r--r--src/test/rustdoc-ui/check.stderr4
-rw-r--r--src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr2
-rw-r--r--src/test/rustdoc-ui/diagnostic-width.rs2
-rw-r--r--src/test/rustdoc-ui/diagnostic-width.stderr2
-rw-r--r--src/test/rustdoc-ui/doc-attr.stderr4
-rw-r--r--src/test/rustdoc-ui/doc-include-suggestion.stderr2
-rw-r--r--src/test/rustdoc-ui/doc-spotlight.stderr8
-rw-r--r--src/test/rustdoc-ui/doc-test-attr.stderr4
-rw-r--r--src/test/rustdoc-ui/doc_cfg_hide.rs11
-rw-r--r--src/test/rustdoc-ui/doc_cfg_hide.stderr40
-rw-r--r--src/test/rustdoc-ui/doctest-edition.stderr2
-rw-r--r--src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr6
-rw-r--r--src/test/rustdoc-ui/ignore-block-help.stderr2
-rw-r--r--src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs3
-rw-r--r--src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr17
-rw-r--r--src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs4
-rw-r--r--src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr17
-rw-r--r--src/test/rustdoc-ui/infinite-recursive-type.stderr4
-rw-r--r--src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/malformed-generics.rs9
-rw-r--r--src/test/rustdoc-ui/intra-doc/malformed-generics.stderr82
-rw-r--r--src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/private.private.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/private.public.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr12
-rw-r--r--src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr2
-rw-r--r--src/test/rustdoc-ui/intra-doc/warning-crlf.stderr2
-rw-r--r--src/test/rustdoc-ui/invalid-doc-attr.stderr6
-rw-r--r--src/test/rustdoc-ui/invalid-html-self-closing-tag.rs70
-rw-r--r--src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr80
-rw-r--r--src/test/rustdoc-ui/invalid-syntax.rs6
-rw-r--r--src/test/rustdoc-ui/invalid-syntax.stderr19
-rw-r--r--src/test/rustdoc-ui/issue-102986.rs4
-rw-r--r--src/test/rustdoc-ui/issue-102986.stderr14
-rw-r--r--src/test/rustdoc-ui/issue-74134.private.stderr2
-rw-r--r--src/test/rustdoc-ui/issue-74134.public.stderr2
-rw-r--r--src/test/rustdoc-ui/lint-group.stderr2
-rw-r--r--src/test/rustdoc-ui/macro-docs.stderr2
-rw-r--r--src/test/rustdoc-ui/no-crate-level-doc-lint.stderr4
-rw-r--r--src/test/rustdoc-ui/normalize-cycle.rs1
-rw-r--r--src/test/rustdoc-ui/normalize-overflow.rs2
-rw-r--r--src/test/rustdoc-ui/pub-export-lint.stderr2
-rw-r--r--src/test/rustdoc-ui/reference-link-reports-error-once.stderr2
-rw-r--r--src/test/rustdoc-ui/renamed-lint-still-applies.stderr4
-rw-r--r--src/test/rustdoc-ui/suggestions/html-as-generics.fixed10
-rw-r--r--src/test/rustdoc-ui/suggestions/html-as-generics.rs10
-rw-r--r--src/test/rustdoc-ui/suggestions/html-as-generics.stderr24
-rw-r--r--src/test/rustdoc-ui/z-help.stdout47
57 files changed, 449 insertions, 131 deletions
diff --git a/src/test/rustdoc-ui/bare-urls.stderr b/src/test/rustdoc-ui/bare-urls.stderr
index 7097a8ddf..ccf52cd0b 100644
--- a/src/test/rustdoc-ui/bare-urls.stderr
+++ b/src/test/rustdoc-ui/bare-urls.stderr
@@ -4,12 +4,12 @@ error: this URL is not a hyperlink
LL | /// https://somewhere.com
| ^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://somewhere.com>`
|
+ = note: bare URLs are not automatically turned into clickable links
note: the lint level is defined here
--> $DIR/bare-urls.rs:3:9
|
LL | #![deny(rustdoc::bare_urls)]
| ^^^^^^^^^^^^^^^^^^
- = note: bare URLs are not automatically turned into clickable links
error: this URL is not a hyperlink
--> $DIR/bare-urls.rs:7:5
diff --git a/src/test/rustdoc-ui/check-attr-test.stderr b/src/test/rustdoc-ui/check-attr-test.stderr
index b1fa9edf0..01beba1ff 100644
--- a/src/test/rustdoc-ui/check-attr-test.stderr
+++ b/src/test/rustdoc-ui/check-attr-test.stderr
@@ -8,12 +8,12 @@ error: unknown attribute `compile-fail`. Did you mean `compile_fail`?
9 | | /// ```
| |_______^
|
+ = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
note: the lint level is defined here
--> $DIR/check-attr-test.rs:3:9
|
3 | #![deny(rustdoc::invalid_codeblock_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
error: unknown attribute `compilefail`. Did you mean `compile_fail`?
--> $DIR/check-attr-test.rs:5:1
diff --git a/src/test/rustdoc-ui/check-attr.stderr b/src/test/rustdoc-ui/check-attr.stderr
index 370b804c5..f66e63ab7 100644
--- a/src/test/rustdoc-ui/check-attr.stderr
+++ b/src/test/rustdoc-ui/check-attr.stderr
@@ -10,12 +10,12 @@ LL | | /// boo
LL | | /// ```
| |_______^
|
+ = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
note: the lint level is defined here
--> $DIR/check-attr.rs:1:9
|
LL | #![deny(rustdoc::invalid_codeblock_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: the code block will either not be tested if not marked as a rust one or won't fail if it compiles successfully
error: unknown attribute `compilefail`. Did you mean `compile_fail`?
--> $DIR/check-attr.rs:3:1
diff --git a/src/test/rustdoc-ui/check-cfg-test.stderr b/src/test/rustdoc-ui/check-cfg-test.stderr
index dc25205da..9770be2f1 100644
--- a/src/test/rustdoc-ui/check-cfg-test.stderr
+++ b/src/test/rustdoc-ui/check-cfg-test.stderr
@@ -4,8 +4,8 @@ warning: unexpected `cfg` condition value
LL | #[cfg(feature = "invalid")]
| ^^^^^^^^^^^^^^^^^^^
|
- = note: `#[warn(unexpected_cfgs)]` on by default
= note: expected values for `feature` are: test
+ = note: `#[warn(unexpected_cfgs)]` on by default
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/check-fail.stderr b/src/test/rustdoc-ui/check-fail.stderr
index 217b89d93..d8aeccbfc 100644
--- a/src/test/rustdoc-ui/check-fail.stderr
+++ b/src/test/rustdoc-ui/check-fail.stderr
@@ -32,8 +32,8 @@ LL | | //! let x = 12;
LL | | //! ```
| |_______^
|
- = note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc::all)]`
= help: the code block will either not be tested if not marked as a rust one or the code will be wrapped inside a main function
+ = note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc::all)]`
error: unknown attribute `testharness`. Did you mean `test_harness`?
--> $DIR/check-fail.rs:16:1
diff --git a/src/test/rustdoc-ui/check.stderr b/src/test/rustdoc-ui/check.stderr
index 78ae65d31..d379f33f2 100644
--- a/src/test/rustdoc-ui/check.stderr
+++ b/src/test/rustdoc-ui/check.stderr
@@ -24,14 +24,14 @@ LL | pub fn foo() {}
warning: no documentation found for this crate's top-level module
|
+ = help: The following guide may be of use:
+ https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
note: the lint level is defined here
--> $DIR/check.rs:10:9
|
LL | #![warn(rustdoc::all)]
| ^^^^^^^^^^^^
= note: `#[warn(rustdoc::missing_crate_level_docs)]` implied by `#[warn(rustdoc::all)]`
- = help: The following guide may be of use:
- https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
warning: missing code example in this documentation
--> $DIR/check.rs:5:1
diff --git a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr
index 67d9c3989..3e08354a6 100644
--- a/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr
+++ b/src/test/rustdoc-ui/deny-intra-link-resolution-failure.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `v2`
LL | /// [v2]
| ^^ no item named `v2` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/deny-intra-link-resolution-failure.rs:1:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: aborting due to previous error
diff --git a/src/test/rustdoc-ui/diagnostic-width.rs b/src/test/rustdoc-ui/diagnostic-width.rs
index 61961d5ec..290d9db77 100644
--- a/src/test/rustdoc-ui/diagnostic-width.rs
+++ b/src/test/rustdoc-ui/diagnostic-width.rs
@@ -1,4 +1,4 @@
-// compile-flags: -Zunstable-options --diagnostic-width=10
+// compile-flags: --diagnostic-width=10
#![deny(rustdoc::bare_urls)]
/// This is a long line that contains a http://link.com
diff --git a/src/test/rustdoc-ui/diagnostic-width.stderr b/src/test/rustdoc-ui/diagnostic-width.stderr
index fed049d2b..1a00d10d3 100644
--- a/src/test/rustdoc-ui/diagnostic-width.stderr
+++ b/src/test/rustdoc-ui/diagnostic-width.stderr
@@ -4,12 +4,12 @@ error: this URL is not a hyperlink
LL | ... a http://link.com
| ^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://link.com>`
|
+ = note: bare URLs are not automatically turned into clickable links
note: the lint level is defined here
--> $DIR/diagnostic-width.rs:2:9
|
LL | ...ny(rustdoc::bare_url...
| ^^^^^^^^^^^^^^^^^^
- = note: bare URLs are not automatically turned into clickable links
error: aborting due to previous error
diff --git a/src/test/rustdoc-ui/doc-attr.stderr b/src/test/rustdoc-ui/doc-attr.stderr
index cc2494c92..68df2771f 100644
--- a/src/test/rustdoc-ui/doc-attr.stderr
+++ b/src/test/rustdoc-ui/doc-attr.stderr
@@ -4,14 +4,14 @@ error: unknown `doc` attribute `as_ptr`
LL | #[doc(as_ptr)]
| ^^^^^^
|
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
note: the lint level is defined here
--> $DIR/doc-attr.rs:2:9
|
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
error: invalid `doc` attribute
--> $DIR/doc-attr.rs:12:7
diff --git a/src/test/rustdoc-ui/doc-include-suggestion.stderr b/src/test/rustdoc-ui/doc-include-suggestion.stderr
index 870b7efa2..fcc93d053 100644
--- a/src/test/rustdoc-ui/doc-include-suggestion.stderr
+++ b/src/test/rustdoc-ui/doc-include-suggestion.stderr
@@ -4,9 +4,9 @@ warning: unknown `doc` attribute `include`
LL | #[doc(include = "external-cross-doc.md")]
| ------^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^-- help: use `doc = include_str!` instead: `#[doc = include_str!("external-cross-doc.md")]`
|
- = note: `#[warn(invalid_doc_attributes)]` on by default
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
+ = note: `#[warn(invalid_doc_attributes)]` on by default
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/doc-spotlight.stderr b/src/test/rustdoc-ui/doc-spotlight.stderr
index 8e7831139..58612327f 100644
--- a/src/test/rustdoc-ui/doc-spotlight.stderr
+++ b/src/test/rustdoc-ui/doc-spotlight.stderr
@@ -4,16 +4,16 @@ error: unknown `doc` attribute `spotlight`
LL | #[doc(spotlight)]
| ^^^^^^^^^ help: use `notable_trait` instead
|
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
+ = note: `doc(spotlight)` was renamed to `doc(notable_trait)`
+ = note: `doc(spotlight)` is now a no-op
note: the lint level is defined here
--> $DIR/doc-spotlight.rs:2:9
|
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
- = note: `doc(spotlight)` was renamed to `doc(notable_trait)`
- = note: `doc(spotlight)` is now a no-op
error: aborting due to previous error
diff --git a/src/test/rustdoc-ui/doc-test-attr.stderr b/src/test/rustdoc-ui/doc-test-attr.stderr
index 7f5e2d6bc..5e6014954 100644
--- a/src/test/rustdoc-ui/doc-test-attr.stderr
+++ b/src/test/rustdoc-ui/doc-test-attr.stderr
@@ -4,13 +4,13 @@ error: `#[doc(test(...)]` takes a list of attributes
LL | #![doc(test)]
| ^^^^
|
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
note: the lint level is defined here
--> $DIR/doc-test-attr.rs:2:9
|
LL | #![deny(invalid_doc_attributes)]
| ^^^^^^^^^^^^^^^^^^^^^^
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
error: `#[doc(test(...)]` takes a list of attributes
--> $DIR/doc-test-attr.rs:7:8
diff --git a/src/test/rustdoc-ui/doc_cfg_hide.rs b/src/test/rustdoc-ui/doc_cfg_hide.rs
new file mode 100644
index 000000000..5d8791748
--- /dev/null
+++ b/src/test/rustdoc-ui/doc_cfg_hide.rs
@@ -0,0 +1,11 @@
+#![feature(doc_cfg_hide)]
+#![deny(warnings)]
+
+#![doc(cfg_hide = "test")] //~ ERROR
+//~^ WARN
+#![doc(cfg_hide)] //~ ERROR
+//~^ WARN
+
+#[doc(cfg_hide(doc))] //~ ERROR
+//~^ WARN
+pub fn foo() {}
diff --git a/src/test/rustdoc-ui/doc_cfg_hide.stderr b/src/test/rustdoc-ui/doc_cfg_hide.stderr
new file mode 100644
index 000000000..03623368c
--- /dev/null
+++ b/src/test/rustdoc-ui/doc_cfg_hide.stderr
@@ -0,0 +1,40 @@
+error: this attribute can only be applied at the crate level
+ --> $DIR/doc_cfg_hide.rs:9:7
+ |
+LL | #[doc(cfg_hide(doc))]
+ | ^^^^^^^^^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
+ = note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
+note: the lint level is defined here
+ --> $DIR/doc_cfg_hide.rs:2:9
+ |
+LL | #![deny(warnings)]
+ | ^^^^^^^^
+ = note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
+help: to apply to the crate, use an inner attribute
+ |
+LL | #![doc(cfg_hide(doc))]
+ | ~~~~~~~~~~~~~~~~~~~~~~
+
+error: `#[doc(cfg_hide(...)]` takes a list of attributes
+ --> $DIR/doc_cfg_hide.rs:4:8
+ |
+LL | #![doc(cfg_hide = "test")]
+ | ^^^^^^^^^^^^^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
+
+error: `#[doc(cfg_hide(...)]` takes a list of attributes
+ --> $DIR/doc_cfg_hide.rs:6:8
+ |
+LL | #![doc(cfg_hide)]
+ | ^^^^^^^^
+ |
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
+
+error: aborting due to 3 previous errors
+
diff --git a/src/test/rustdoc-ui/doctest-edition.stderr b/src/test/rustdoc-ui/doctest-edition.stderr
index 1643d6053..8a3329aa3 100644
--- a/src/test/rustdoc-ui/doctest-edition.stderr
+++ b/src/test/rustdoc-ui/doctest-edition.stderr
@@ -7,12 +7,12 @@ LL | | //! foo'b'
LL | | //! ```
| |_______^
|
+ = note: error from rustc: prefix `foo` is unknown
note: the lint level is defined here
--> $DIR/doctest-edition.rs:3:9
|
LL | #![deny(rustdoc::invalid_rust_codeblocks)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: error from rustc: prefix `foo` is unknown
help: mark blocks that do not contain Rust code as text
|
LL | //! ```text
diff --git a/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr b/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr
index 517e08aa7..cbe9a3d14 100644
--- a/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr
+++ b/src/test/rustdoc-ui/feature-gate-rustdoc_missing_doc_code_examples.stderr
@@ -4,14 +4,14 @@ error: unknown lint: `rustdoc::missing_doc_code_examples`
LL | #![allow(rustdoc::missing_doc_code_examples)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
+ = note: the `rustdoc::missing_doc_code_examples` lint is unstable
+ = note: see issue #101730 <https://github.com/rust-lang/rust/issues/101730> for more information
+ = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable
note: the lint level is defined here
--> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:1:9
|
LL | #![deny(unknown_lints)]
| ^^^^^^^^^^^^^
- = note: the `rustdoc::missing_doc_code_examples` lint is unstable
- = note: see issue #101730 <https://github.com/rust-lang/rust/issues/101730> for more information
- = help: add `#![feature(rustdoc_missing_doc_code_examples)]` to the crate attributes to enable
error: unknown lint: `rustdoc::missing_doc_code_examples`
--> $DIR/feature-gate-rustdoc_missing_doc_code_examples.rs:4:1
diff --git a/src/test/rustdoc-ui/ignore-block-help.stderr b/src/test/rustdoc-ui/ignore-block-help.stderr
index 9c02ff11d..a30ea51dd 100644
--- a/src/test/rustdoc-ui/ignore-block-help.stderr
+++ b/src/test/rustdoc-ui/ignore-block-help.stderr
@@ -7,13 +7,13 @@ LL | | /// let heart = '❤️';
LL | | /// ```
| |_______^
|
- = note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
help: `ignore` code blocks require valid Rust code for syntax highlighting; mark blocks that do not contain Rust code as text: ```text
--> $DIR/ignore-block-help.rs:3:5
|
LL | /// ```ignore (to-prevent-tidy-error)
| ^^^
= note: error from rustc: character literal may only contain one codepoint
+ = note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs
index 2319de556..4b1e04234 100644
--- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs
+++ b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.rs
@@ -1,11 +1,12 @@
+// check-pass
// normalize-stderr-test: "`.*`" -> "`DEF_ID`"
// normalize-stdout-test: "`.*`" -> "`DEF_ID`"
// edition:2018
pub async fn f() -> impl std::fmt::Debug {
+ // rustdoc doesn't care that this is infinitely sized
#[derive(Debug)]
enum E {
- //~^ ERROR recursive type `f::{closure#0}::E` has infinite size
This(E),
Unit,
}
diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr
deleted file mode 100644
index aa39d26fe..000000000
--- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait-return.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0072]: recursive type `DEF_ID` has infinite size
- --> $DIR/infinite-recursive-type-impl-trait-return.rs:7:5
- |
-LL | enum E {
- | ^^^^^^ recursive type has infinite size
-LL |
-LL | This(E),
- | - recursive without indirection
- |
-help: insert some indirection (e.g., a `DEF_ID` representable
- |
-LL | This(Box<E>),
- | ++++ +
-
-error: aborting due to previous error
-
-For more information about this error, try `DEF_ID`.
diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs
index b3a7ee563..ac79582fb 100644
--- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs
+++ b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.rs
@@ -1,6 +1,8 @@
+// check-pass
+
fn f() -> impl Sized {
+ // rustdoc doesn't care that this is infinitely sized
enum E {
- //~^ ERROR recursive type `f::E` has infinite size
V(E),
}
unimplemented!()
diff --git a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr b/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr
deleted file mode 100644
index 009bedec5..000000000
--- a/src/test/rustdoc-ui/infinite-recursive-type-impl-trait.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0072]: recursive type `f::E` has infinite size
- --> $DIR/infinite-recursive-type-impl-trait.rs:2:5
- |
-LL | enum E {
- | ^^^^^^ recursive type has infinite size
-LL |
-LL | V(E),
- | - recursive without indirection
- |
-help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `f::E` representable
- |
-LL | V(Box<E>),
- | ++++ +
-
-error: aborting due to previous error
-
-For more information about this error, try `rustc --explain E0072`.
diff --git a/src/test/rustdoc-ui/infinite-recursive-type.stderr b/src/test/rustdoc-ui/infinite-recursive-type.stderr
index b33aba446..9e2c3ff16 100644
--- a/src/test/rustdoc-ui/infinite-recursive-type.stderr
+++ b/src/test/rustdoc-ui/infinite-recursive-type.stderr
@@ -2,12 +2,12 @@ error[E0072]: recursive type `E` has infinite size
--> $DIR/infinite-recursive-type.rs:1:1
|
LL | enum E {
- | ^^^^^^ recursive type has infinite size
+ | ^^^^^^
LL |
LL | V(E),
| - recursive without indirection
|
-help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to make `E` representable
+help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
|
LL | V(Box<E>),
| ++++ +
diff --git a/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr b/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr
index 00fe229da..7c81044db 100644
--- a/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr
+++ b/src/test/rustdoc-ui/intra-doc/html-as-generics-intra-doc.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `NonExistentStruct`
LL | /// This [test][NonExistentStruct<i32>] thing!
| ^^^^^^^^^^^^^^^^^^^^^^ no item named `NonExistentStruct` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/html-as-generics-intra-doc.rs:2:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `NonExistentStruct2`
--> $DIR/html-as-generics-intra-doc.rs:17:11
diff --git a/src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr b/src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr
index 8e17323fd..6ad8084b0 100644
--- a/src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr
+++ b/src/test/rustdoc-ui/intra-doc/macro-rules-error.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `before_but_limited_to_module`
LL | /// [before_but_limited_to_module]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no item named `before_but_limited_to_module` in scope
|
+ = note: `macro_rules` named `before_but_limited_to_module` exists in this crate, but it is not in scope at this link's location
note: the lint level is defined here
--> $DIR/macro-rules-error.rs:5:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = note: `macro_rules` named `before_but_limited_to_module` exists in this crate, but it is not in scope at this link's location
error: unresolved link to `after`
--> $DIR/macro-rules-error.rs:15:6
diff --git a/src/test/rustdoc-ui/intra-doc/malformed-generics.rs b/src/test/rustdoc-ui/intra-doc/malformed-generics.rs
index 15e02925e..161625ed2 100644
--- a/src/test/rustdoc-ui/intra-doc/malformed-generics.rs
+++ b/src/test/rustdoc-ui/intra-doc/malformed-generics.rs
@@ -3,17 +3,26 @@
//! [Vec<] //~ ERROR
//! [Vec<Box<T] //~ ERROR
//! [Vec<Box<T>] //~ ERROR
+//~^ WARN
//! [Vec<Box<T>>>] //~ ERROR
+//~^ WARN
//! [Vec<T>>>] //~ ERROR
+//~^ WARN
//! [<Vec] //~ ERROR
//! [Vec::<] //~ ERROR
//! [<T>] //~ ERROR
+//~^ WARN
//! [<invalid syntax>] //~ ERROR
+//~^ WARN
//! [Vec:<T>:new()] //~ ERROR
+//~^ WARN
//! [Vec<<T>>] //~ ERROR
+//~^ WARN
//! [Vec<>] //~ ERROR
//! [Vec<<>>] //~ ERROR
// FIXME(#74563) support UFCS
//! [<Vec as IntoIterator>::into_iter] //~ ERROR
+//~^ WARN
//! [<Vec<T> as IntoIterator>::iter] //~ ERROR
+//~^ WARN
diff --git a/src/test/rustdoc-ui/intra-doc/malformed-generics.stderr b/src/test/rustdoc-ui/intra-doc/malformed-generics.stderr
index 5bc0f84e2..08349fef8 100644
--- a/src/test/rustdoc-ui/intra-doc/malformed-generics.stderr
+++ b/src/test/rustdoc-ui/intra-doc/malformed-generics.stderr
@@ -23,67 +23,67 @@ LL | //! [Vec<Box<T>]
| ^^^^^^^^^^ unbalanced angle brackets
error: unresolved link to `Vec<Box<T>>>`
- --> $DIR/malformed-generics.rs:6:6
+ --> $DIR/malformed-generics.rs:7:6
|
LL | //! [Vec<Box<T>>>]
| ^^^^^^^^^^^^ unbalanced angle brackets
error: unresolved link to `Vec<T>>>`
- --> $DIR/malformed-generics.rs:7:6
+ --> $DIR/malformed-generics.rs:9:6
|
LL | //! [Vec<T>>>]
| ^^^^^^^^ unbalanced angle brackets
error: unresolved link to `<Vec`
- --> $DIR/malformed-generics.rs:8:6
+ --> $DIR/malformed-generics.rs:11:6
|
LL | //! [<Vec]
| ^^^^ unbalanced angle brackets
error: unresolved link to `Vec::<`
- --> $DIR/malformed-generics.rs:9:6
+ --> $DIR/malformed-generics.rs:12:6
|
LL | //! [Vec::<]
| ^^^^^^ unbalanced angle brackets
error: unresolved link to `<T>`
- --> $DIR/malformed-generics.rs:10:6
+ --> $DIR/malformed-generics.rs:13:6
|
LL | //! [<T>]
| ^^^ missing type for generic parameters
error: unresolved link to `<invalid syntax>`
- --> $DIR/malformed-generics.rs:11:6
+ --> $DIR/malformed-generics.rs:15:6
|
LL | //! [<invalid syntax>]
| ^^^^^^^^^^^^^^^^ missing type for generic parameters
error: unresolved link to `Vec:<T>:new`
- --> $DIR/malformed-generics.rs:12:6
+ --> $DIR/malformed-generics.rs:17:6
|
LL | //! [Vec:<T>:new()]
| ^^^^^^^^^^^^^ has invalid path separator
error: unresolved link to `Vec<<T>>`
- --> $DIR/malformed-generics.rs:13:6
+ --> $DIR/malformed-generics.rs:19:6
|
LL | //! [Vec<<T>>]
| ^^^^^^^^ too many angle brackets
error: unresolved link to `Vec<>`
- --> $DIR/malformed-generics.rs:14:6
+ --> $DIR/malformed-generics.rs:21:6
|
LL | //! [Vec<>]
| ^^^^^ empty angle brackets
error: unresolved link to `Vec<<>>`
- --> $DIR/malformed-generics.rs:15:6
+ --> $DIR/malformed-generics.rs:22:6
|
LL | //! [Vec<<>>]
| ^^^^^^^ too many angle brackets
error: unresolved link to `<Vec as IntoIterator>::into_iter`
- --> $DIR/malformed-generics.rs:18:6
+ --> $DIR/malformed-generics.rs:25:6
|
LL | //! [<Vec as IntoIterator>::into_iter]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported
@@ -91,12 +91,68 @@ LL | //! [<Vec as IntoIterator>::into_iter]
= note: see https://github.com/rust-lang/rust/issues/74563 for more information
error: unresolved link to `<Vec<T> as IntoIterator>::iter`
- --> $DIR/malformed-generics.rs:19:6
+ --> $DIR/malformed-generics.rs:27:6
|
LL | //! [<Vec<T> as IntoIterator>::iter]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ fully-qualified syntax is unsupported
|
= note: see https://github.com/rust-lang/rust/issues/74563 for more information
-error: aborting due to 15 previous errors
+warning: unclosed HTML tag `T`
+ --> $DIR/malformed-generics.rs:5:13
+ |
+LL | //! [Vec<Box<T>]
+ | ^^^
+ |
+ = note: `#[warn(rustdoc::invalid_html_tags)]` on by default
+
+warning: unclosed HTML tag `T`
+ --> $DIR/malformed-generics.rs:7:13
+ |
+LL | //! [Vec<Box<T>>>]
+ | ^^^
+
+warning: unclosed HTML tag `T`
+ --> $DIR/malformed-generics.rs:9:9
+ |
+LL | //! [Vec<T>>>]
+ | ^^^
+
+warning: unclosed HTML tag `T`
+ --> $DIR/malformed-generics.rs:13:6
+ |
+LL | //! [<T>]
+ | ^^^
+
+warning: unclosed HTML tag `invalid`
+ --> $DIR/malformed-generics.rs:15:6
+ |
+LL | //! [<invalid syntax>]
+ | ^^^^^^^^
+
+warning: unclosed HTML tag `T`
+ --> $DIR/malformed-generics.rs:17:10
+ |
+LL | //! [Vec:<T>:new()]
+ | ^^^
+
+warning: unclosed HTML tag `T`
+ --> $DIR/malformed-generics.rs:19:10
+ |
+LL | //! [Vec<<T>>]
+ | ^^^
+
+warning: unclosed HTML tag `Vec`
+ --> $DIR/malformed-generics.rs:25:6
+ |
+LL | //! [<Vec as IntoIterator>::into_iter]
+ | ^^^^
+
+warning: unclosed HTML tag `T`
+ --> $DIR/malformed-generics.rs:27:10
+ |
+LL | //! [<Vec<T> as IntoIterator>::iter]
+ | ^^^
+
+error: aborting due to 15 previous errors; 9 warnings emitted
diff --git a/src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr b/src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr
index 4828a3044..8ec894d10 100644
--- a/src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr
+++ b/src/test/rustdoc-ui/intra-doc/non-path-primitives.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `T`
LL | //! [[T]::rotate_left]
| ^ no item named `T` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/non-path-primitives.rs:1:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `Z`
--> $DIR/non-path-primitives.rs:14:5
diff --git a/src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr b/src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr
index 6172cd2e3..4d5bd70bf 100644
--- a/src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr
+++ b/src/test/rustdoc-ui/intra-doc/private-from-crate-level.stderr
@@ -4,8 +4,8 @@ warning: public documentation for `private_from_crate_level` links to private it
LL | //! [my_module]
| ^^^^^^^^^ this item is private
|
- = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link will resolve properly if you pass `--document-private-items`
+ = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/intra-doc/private.private.stderr b/src/test/rustdoc-ui/intra-doc/private.private.stderr
index 392321f9c..6661e9021 100644
--- a/src/test/rustdoc-ui/intra-doc/private.private.stderr
+++ b/src/test/rustdoc-ui/intra-doc/private.private.stderr
@@ -4,8 +4,8 @@ warning: public documentation for `DocMe` links to private item `DontDocMe`
LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x]
| ^^^^^^^^^ this item is private
|
- = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link resolves only because you passed `--document-private-items`, but will break without
+ = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
warning: public documentation for `DocMe` links to private item `DontDocMe::f`
--> $DIR/private.rs:7:23
diff --git a/src/test/rustdoc-ui/intra-doc/private.public.stderr b/src/test/rustdoc-ui/intra-doc/private.public.stderr
index 5d1c34b91..45b51e12e 100644
--- a/src/test/rustdoc-ui/intra-doc/private.public.stderr
+++ b/src/test/rustdoc-ui/intra-doc/private.public.stderr
@@ -4,8 +4,8 @@ warning: public documentation for `DocMe` links to private item `DontDocMe`
LL | /// docs [DontDocMe] [DontDocMe::f] [DontDocMe::x]
| ^^^^^^^^^ this item is private
|
- = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link will resolve properly if you pass `--document-private-items`
+ = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
warning: public documentation for `DocMe` links to private item `DontDocMe::f`
--> $DIR/private.rs:7:23
diff --git a/src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr b/src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr
index bf4ab9fdd..e8ee40ad4 100644
--- a/src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr
+++ b/src/test/rustdoc-ui/intra-doc/span-ice-55723.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `i`
LL | /// (arr[i])
| ^ no item named `i` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/span-ice-55723.rs:1:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: aborting due to previous error
diff --git a/src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr b/src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr
index f0a7ed178..508d0683d 100644
--- a/src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr
+++ b/src/test/rustdoc-ui/intra-doc/through-proc-macro.stderr
@@ -4,12 +4,12 @@ warning: unresolved link to `Oooops`
LL | /// [Oooops]
| ^^^^^^ no item named `Oooops` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/through-proc-macro.rs:7:9
|
LL | #![warn(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr
index bb8572eae..e7b4c43e7 100644
--- a/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr
+++ b/src/test/rustdoc-ui/intra-doc/unknown-disambiguator.stderr
@@ -4,13 +4,13 @@ error: unknown disambiguator `foo`
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
| ^^^
|
+ = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
note: the lint level is defined here
--> $DIR/unknown-disambiguator.rs:2:9
|
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(warnings)]`
- = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator `bar`
--> $DIR/unknown-disambiguator.rs:4:35
@@ -18,7 +18,7 @@ error: unknown disambiguator `bar`
LL | //! Linking to [foo@banana] and [`bar@banana!()`].
| ^^^
|
- = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+ = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator `foo`
--> $DIR/unknown-disambiguator.rs:10:34
@@ -26,7 +26,7 @@ error: unknown disambiguator `foo`
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
| ^^^
|
- = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+ = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator `foo`
--> $DIR/unknown-disambiguator.rs:10:48
@@ -34,7 +34,7 @@ error: unknown disambiguator `foo`
LL | //! And with weird backticks: [``foo@hello``] [foo`@`hello].
| ^^^
|
- = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+ = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator ``
--> $DIR/unknown-disambiguator.rs:7:31
@@ -42,7 +42,7 @@ error: unknown disambiguator ``
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
| ^
|
- = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+ = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: unknown disambiguator ``
--> $DIR/unknown-disambiguator.rs:7:57
@@ -50,7 +50,7 @@ error: unknown disambiguator ``
LL | //! And to [no disambiguator](@nectarine) and [another](@apricot!()).
| ^
|
- = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/write-documentation/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
+ = note: see https://doc.rust-lang.org/$CHANNEL/rustdoc/linking-to-items-by-name.html#namespaces-and-disambiguators for more info about disambiguators
error: aborting due to 6 previous errors
diff --git a/src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr b/src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr
index 5c0df1d1b..815324563 100644
--- a/src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr
+++ b/src/test/rustdoc-ui/intra-doc/unused-extern-crate.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `zip`
LL | /// See [zip] crate.
| ^^^ no item named `zip` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/unused-extern-crate.rs:2:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: aborting due to previous error
diff --git a/src/test/rustdoc-ui/intra-doc/warning-crlf.stderr b/src/test/rustdoc-ui/intra-doc/warning-crlf.stderr
index d46df9264..c309a55f4 100644
--- a/src/test/rustdoc-ui/intra-doc/warning-crlf.stderr
+++ b/src/test/rustdoc-ui/intra-doc/warning-crlf.stderr
@@ -4,8 +4,8 @@ warning: unresolved link to `error`
LL | /// [error]
| ^^^^^ no item named `error` in scope
|
- = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+ = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
warning: unresolved link to `error1`
--> $DIR/warning-crlf.rs:12:11
diff --git a/src/test/rustdoc-ui/invalid-doc-attr.stderr b/src/test/rustdoc-ui/invalid-doc-attr.stderr
index a4fa38179..3c66e587b 100644
--- a/src/test/rustdoc-ui/invalid-doc-attr.stderr
+++ b/src/test/rustdoc-ui/invalid-doc-attr.stderr
@@ -4,15 +4,15 @@ error: this attribute can only be applied at the crate level
LL | #[doc(test(no_crate_inject))]
| ^^^^^^^^^^^^^^^^^^^^^
|
+ = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
+ = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
+ = note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
note: the lint level is defined here
--> $DIR/invalid-doc-attr.rs:2:9
|
LL | #![deny(warnings)]
| ^^^^^^^^
= note: `#[deny(invalid_doc_attributes)]` implied by `#[deny(warnings)]`
- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
- = note: for more information, see issue #82730 <https://github.com/rust-lang/rust/issues/82730>
- = note: read <https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html#at-the-crate-level> for more information
help: to apply to the crate, use an inner attribute
|
LL | #![doc(test(no_crate_inject))]
diff --git a/src/test/rustdoc-ui/invalid-html-self-closing-tag.rs b/src/test/rustdoc-ui/invalid-html-self-closing-tag.rs
new file mode 100644
index 000000000..d973a53cb
--- /dev/null
+++ b/src/test/rustdoc-ui/invalid-html-self-closing-tag.rs
@@ -0,0 +1,70 @@
+#![deny(rustdoc::invalid_html_tags)]
+
+/// <p/>
+//~^ ERROR invalid self-closing HTML tag `p`
+pub struct A;
+
+/// <p style/>
+//~^ ERROR invalid self-closing HTML tag `p`
+pub struct B;
+
+/// <p style=""/>
+//~^ ERROR invalid self-closing HTML tag `p`
+pub struct C;
+
+/// <p style="x"/>
+//~^ ERROR invalid self-closing HTML tag `p`
+pub struct D;
+
+/// <p style="x/></p>
+//~^ ERROR unclosed quoted HTML attribute
+pub struct E;
+
+/// <p style='x/></p>
+//~^ ERROR unclosed quoted HTML attribute
+pub struct F;
+
+/// <p style="x/"></p>
+pub struct G;
+
+/// <p style="x/"/>
+//~^ ERROR invalid self-closing HTML tag `p`
+pub struct H;
+
+/// <p / >
+//~^ ERROR invalid self-closing HTML tag `p`
+pub struct I;
+
+/// <br/>
+pub struct J;
+
+/// <a href=/></a>
+pub struct K;
+
+/// <a href=//></a>
+pub struct L;
+
+/// <a href="/"/>
+//~^ ERROR invalid self-closing HTML tag `a`
+pub struct M;
+
+/// <a href=x />
+//~^ ERROR invalid self-closing HTML tag `a`
+pub struct N;
+
+/// <a href= />
+//~^ ERROR invalid self-closing HTML tag `a`
+pub struct O;
+
+/// <a href=x/></a>
+pub struct P;
+
+/// <svg><rect width=1 height=1 /></svg>
+pub struct Q;
+
+/// <svg><rect width=1 height=/></svg>
+//~^ ERROR unclosed HTML tag `rect`
+pub struct R;
+
+/// <svg / q>
+pub struct S;
diff --git a/src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr b/src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr
new file mode 100644
index 000000000..e45edfb43
--- /dev/null
+++ b/src/test/rustdoc-ui/invalid-html-self-closing-tag.stderr
@@ -0,0 +1,80 @@
+error: invalid self-closing HTML tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:3:5
+ |
+LL | /// <p/>
+ | ^^
+ |
+note: the lint level is defined here
+ --> $DIR/invalid-html-self-closing-tag.rs:1:9
+ |
+LL | #![deny(rustdoc::invalid_html_tags)]
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: invalid self-closing HTML tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:7:5
+ |
+LL | /// <p style/>
+ | ^^
+
+error: invalid self-closing HTML tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:11:5
+ |
+LL | /// <p style=""/>
+ | ^^
+
+error: invalid self-closing HTML tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:15:5
+ |
+LL | /// <p style="x"/>
+ | ^^
+
+error: unclosed quoted HTML attribute on tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:19:14
+ |
+LL | /// <p style="x/></p>
+ | ^
+
+error: unclosed quoted HTML attribute on tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:23:14
+ |
+LL | /// <p style='x/></p>
+ | ^
+
+error: invalid self-closing HTML tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:30:5
+ |
+LL | /// <p style="x/"/>
+ | ^^
+
+error: invalid self-closing HTML tag `p`
+ --> $DIR/invalid-html-self-closing-tag.rs:34:5
+ |
+LL | /// <p / >
+ | ^^
+
+error: invalid self-closing HTML tag `a`
+ --> $DIR/invalid-html-self-closing-tag.rs:47:5
+ |
+LL | /// <a href="/"/>
+ | ^^
+
+error: invalid self-closing HTML tag `a`
+ --> $DIR/invalid-html-self-closing-tag.rs:51:5
+ |
+LL | /// <a href=x />
+ | ^^
+
+error: invalid self-closing HTML tag `a`
+ --> $DIR/invalid-html-self-closing-tag.rs:55:5
+ |
+LL | /// <a href= />
+ | ^^
+
+error: unclosed HTML tag `rect`
+ --> $DIR/invalid-html-self-closing-tag.rs:65:10
+ |
+LL | /// <svg><rect width=1 height=/></svg>
+ | ^^^^^
+
+error: aborting due to 12 previous errors
+
diff --git a/src/test/rustdoc-ui/invalid-syntax.rs b/src/test/rustdoc-ui/invalid-syntax.rs
index b503d1093..acb2a6f08 100644
--- a/src/test/rustdoc-ui/invalid-syntax.rs
+++ b/src/test/rustdoc-ui/invalid-syntax.rs
@@ -99,3 +99,9 @@ pub fn indent_after_fenced() {}
/// ```
pub fn invalid() {}
//~^^^^ WARNING could not parse code block as Rust code
+
+/// ```
+/// fn wook_at_my_beautifuw_bwaces_plz() {);
+/// ```
+pub fn uwu() {}
+//~^^^^ WARNING could not parse code block as Rust code
diff --git a/src/test/rustdoc-ui/invalid-syntax.stderr b/src/test/rustdoc-ui/invalid-syntax.stderr
index 4c6249cc6..597d19e74 100644
--- a/src/test/rustdoc-ui/invalid-syntax.stderr
+++ b/src/test/rustdoc-ui/invalid-syntax.stderr
@@ -7,10 +7,10 @@ LL | | /// \__________pkt->size___________/ \_result->size_/ \__pkt->si
LL | | /// ```
| |_______^
|
- = note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
= note: error from rustc: unknown start of token: \
= note: error from rustc: unknown start of token: \
= note: error from rustc: unknown start of token: \
+ = note: `#[warn(rustdoc::invalid_rust_codeblocks)]` on by default
help: mark blocks that do not contain Rust code as text
|
LL | /// ```text
@@ -150,5 +150,20 @@ help: mark blocks that do not contain Rust code as text
LL | /// ```text
| ++++
-warning: 12 warnings emitted
+warning: could not parse code block as Rust code
+ --> $DIR/invalid-syntax.rs:103:5
+ |
+LL | /// ```
+ | _____^
+LL | | /// fn wook_at_my_beautifuw_bwaces_plz() {);
+LL | | /// ```
+ | |_______^
+ |
+ = note: error from rustc: mismatched closing delimiter: `)`
+help: mark blocks that do not contain Rust code as text
+ |
+LL | /// ```text
+ | ++++
+
+warning: 13 warnings emitted
diff --git a/src/test/rustdoc-ui/issue-102986.rs b/src/test/rustdoc-ui/issue-102986.rs
new file mode 100644
index 000000000..001784ac2
--- /dev/null
+++ b/src/test/rustdoc-ui/issue-102986.rs
@@ -0,0 +1,4 @@
+struct Struct {
+ y: (typeof("hey"),),
+ //~^ `typeof` is a reserved keyword but unimplemented
+}
diff --git a/src/test/rustdoc-ui/issue-102986.stderr b/src/test/rustdoc-ui/issue-102986.stderr
new file mode 100644
index 000000000..3a573726c
--- /dev/null
+++ b/src/test/rustdoc-ui/issue-102986.stderr
@@ -0,0 +1,14 @@
+error[E0516]: `typeof` is a reserved keyword but unimplemented
+ --> $DIR/issue-102986.rs:2:9
+ |
+LL | y: (typeof("hey"),),
+ | ^^^^^^^^^^^^^ reserved keyword
+ |
+help: consider replacing `typeof(...)` with an actual type
+ |
+LL | y: (&'static str,),
+ | ~~~~~~~~~~~~
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0516`.
diff --git a/src/test/rustdoc-ui/issue-74134.private.stderr b/src/test/rustdoc-ui/issue-74134.private.stderr
index 31d2dbe96..44c88b618 100644
--- a/src/test/rustdoc-ui/issue-74134.private.stderr
+++ b/src/test/rustdoc-ui/issue-74134.private.stderr
@@ -4,8 +4,8 @@ warning: public documentation for `public_item` links to private item `PrivateTy
LL | /// [`PrivateType`]
| ^^^^^^^^^^^ this item is private
|
- = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link resolves only because you passed `--document-private-items`, but will break without
+ = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/issue-74134.public.stderr b/src/test/rustdoc-ui/issue-74134.public.stderr
index 6a3173e3e..5b1887b83 100644
--- a/src/test/rustdoc-ui/issue-74134.public.stderr
+++ b/src/test/rustdoc-ui/issue-74134.public.stderr
@@ -4,8 +4,8 @@ warning: public documentation for `public_item` links to private item `PrivateTy
LL | /// [`PrivateType`]
| ^^^^^^^^^^^ this item is private
|
- = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
= note: this link will resolve properly if you pass `--document-private-items`
+ = note: `#[warn(rustdoc::private_intra_doc_links)]` on by default
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/lint-group.stderr b/src/test/rustdoc-ui/lint-group.stderr
index 5336c0445..4f2c96588 100644
--- a/src/test/rustdoc-ui/lint-group.stderr
+++ b/src/test/rustdoc-ui/lint-group.stderr
@@ -35,8 +35,8 @@ error: unresolved link to `error`
LL | /// what up, let's make an [error]
| ^^^^^ no item named `error` in scope
|
- = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(rustdoc::all)]`
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+ = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(rustdoc::all)]`
error: unclosed HTML tag `unknown`
--> $DIR/lint-group.rs:28:5
diff --git a/src/test/rustdoc-ui/macro-docs.stderr b/src/test/rustdoc-ui/macro-docs.stderr
index e3cc17311..2b136f5be 100644
--- a/src/test/rustdoc-ui/macro-docs.stderr
+++ b/src/test/rustdoc-ui/macro-docs.stderr
@@ -7,13 +7,13 @@ LL | /// A
LL | m!();
| ---- in this macro invocation
|
- = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
= note: the link appears in this line:
[`long_cat`] is really long
^^^^^^^^^^
= note: no item named `long_cat` in scope
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
+ = note: `#[warn(rustdoc::broken_intra_doc_links)]` on by default
= note: this warning originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info)
warning: 1 warning emitted
diff --git a/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr b/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr
index 1a1f8085a..fb3a5e415 100644
--- a/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr
+++ b/src/test/rustdoc-ui/no-crate-level-doc-lint.stderr
@@ -1,12 +1,12 @@
error: no documentation found for this crate's top-level module
|
+ = help: The following guide may be of use:
+ https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
note: the lint level is defined here
--> $DIR/no-crate-level-doc-lint.rs:3:9
|
LL | #![deny(rustdoc::missing_crate_level_docs)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: The following guide may be of use:
- https://doc.rust-lang.org/$CHANNEL/rustdoc/how-to-write-documentation.html
error: aborting due to previous error
diff --git a/src/test/rustdoc-ui/normalize-cycle.rs b/src/test/rustdoc-ui/normalize-cycle.rs
index 14ffac1e1..1ed9ac6bc 100644
--- a/src/test/rustdoc-ui/normalize-cycle.rs
+++ b/src/test/rustdoc-ui/normalize-cycle.rs
@@ -1,4 +1,5 @@
// check-pass
+// compile-flags: -Znormalize-docs
// Regression test for <https://github.com/rust-lang/rust/issues/79459>.
pub trait Query {}
diff --git a/src/test/rustdoc-ui/normalize-overflow.rs b/src/test/rustdoc-ui/normalize-overflow.rs
index 0cdcc88e3..3698fe70e 100644
--- a/src/test/rustdoc-ui/normalize-overflow.rs
+++ b/src/test/rustdoc-ui/normalize-overflow.rs
@@ -1,3 +1,5 @@
// aux-crate:overflow=overflow.rs
// check-pass
// Regression test for <https://github.com/rust-lang/rust/issues/79506>.
+
+extern crate overflow;
diff --git a/src/test/rustdoc-ui/pub-export-lint.stderr b/src/test/rustdoc-ui/pub-export-lint.stderr
index c6be9c6a9..81ef79961 100644
--- a/src/test/rustdoc-ui/pub-export-lint.stderr
+++ b/src/test/rustdoc-ui/pub-export-lint.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `aloha`
LL | /// [aloha]
| ^^^^^ no item named `aloha` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/pub-export-lint.rs:1:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: aborting due to previous error
diff --git a/src/test/rustdoc-ui/reference-link-reports-error-once.stderr b/src/test/rustdoc-ui/reference-link-reports-error-once.stderr
index b46a51e93..2ab67090f 100644
--- a/src/test/rustdoc-ui/reference-link-reports-error-once.stderr
+++ b/src/test/rustdoc-ui/reference-link-reports-error-once.stderr
@@ -4,12 +4,12 @@ error: unresolved link to `ref`
LL | /// [a]: ref
| ^^^ no item named `ref` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/reference-link-reports-error-once.rs:1:9
|
LL | #![deny(rustdoc::broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unresolved link to `ref2`
--> $DIR/reference-link-reports-error-once.rs:15:10
diff --git a/src/test/rustdoc-ui/renamed-lint-still-applies.stderr b/src/test/rustdoc-ui/renamed-lint-still-applies.stderr
index 8e2a2cdd7..ee9b67cb9 100644
--- a/src/test/rustdoc-ui/renamed-lint-still-applies.stderr
+++ b/src/test/rustdoc-ui/renamed-lint-still-applies.stderr
@@ -18,12 +18,12 @@ error: unresolved link to `x`
LL | //! [x]
| ^ no item named `x` in scope
|
+ = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
note: the lint level is defined here
--> $DIR/renamed-lint-still-applies.rs:2:9
|
LL | #![deny(broken_intra_doc_links)]
| ^^^^^^^^^^^^^^^^^^^^^^
- = help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: this URL is not a hyperlink
--> $DIR/renamed-lint-still-applies.rs:9:5
@@ -31,12 +31,12 @@ error: this URL is not a hyperlink
LL | //! http://example.com
| ^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<http://example.com>`
|
+ = note: bare URLs are not automatically turned into clickable links
note: the lint level is defined here
--> $DIR/renamed-lint-still-applies.rs:7:9
|
LL | #![deny(rustdoc::non_autolinks)]
| ^^^^^^^^^^^^^^^^^^^^^^
- = note: bare URLs are not automatically turned into clickable links
error: aborting due to 2 previous errors; 2 warnings emitted
diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.fixed b/src/test/rustdoc-ui/suggestions/html-as-generics.fixed
index 07c8c9ff2..003542d38 100644
--- a/src/test/rustdoc-ui/suggestions/html-as-generics.fixed
+++ b/src/test/rustdoc-ui/suggestions/html-as-generics.fixed
@@ -70,3 +70,13 @@ pub struct NestedGenericsWithPunct;
//~^ ERROR unclosed HTML tag `i32`
//~|HELP try marking as source
pub struct NestedGenericsWithPunct2;
+
+/// This [`Vec<i32>`] thing!
+//~^ERROR unclosed HTML tag `i32`
+//~|HELP try marking as source
+pub struct IntraDocLink;
+
+/// This [`Vec::<i32>`] thing!
+//~^ERROR unclosed HTML tag `i32`
+//~|HELP try marking as source
+pub struct IntraDocLinkTurbofish;
diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.rs b/src/test/rustdoc-ui/suggestions/html-as-generics.rs
index cdd652f39..4254a660b 100644
--- a/src/test/rustdoc-ui/suggestions/html-as-generics.rs
+++ b/src/test/rustdoc-ui/suggestions/html-as-generics.rs
@@ -70,3 +70,13 @@ pub struct NestedGenericsWithPunct;
//~^ ERROR unclosed HTML tag `i32`
//~|HELP try marking as source
pub struct NestedGenericsWithPunct2;
+
+/// This [Vec<i32>] thing!
+//~^ERROR unclosed HTML tag `i32`
+//~|HELP try marking as source
+pub struct IntraDocLink;
+
+/// This [Vec::<i32>] thing!
+//~^ERROR unclosed HTML tag `i32`
+//~|HELP try marking as source
+pub struct IntraDocLinkTurbofish;
diff --git a/src/test/rustdoc-ui/suggestions/html-as-generics.stderr b/src/test/rustdoc-ui/suggestions/html-as-generics.stderr
index 211dd4210..481278bda 100644
--- a/src/test/rustdoc-ui/suggestions/html-as-generics.stderr
+++ b/src/test/rustdoc-ui/suggestions/html-as-generics.stderr
@@ -157,5 +157,27 @@ help: try marking as source code
LL | /// Generics with punct `Vec<Vec<i32>>`!
| + +
-error: aborting due to 14 previous errors
+error: unclosed HTML tag `i32`
+ --> $DIR/html-as-generics.rs:74:14
+ |
+LL | /// This [Vec<i32>] thing!
+ | ^^^^^
+ |
+help: try marking as source code
+ |
+LL | /// This [`Vec<i32>`] thing!
+ | + +
+
+error: unclosed HTML tag `i32`
+ --> $DIR/html-as-generics.rs:79:16
+ |
+LL | /// This [Vec::<i32>] thing!
+ | ^^^^^
+ |
+help: try marking as source code
+ |
+LL | /// This [`Vec::<i32>`] thing!
+ | + +
+
+error: aborting due to 16 previous errors
diff --git a/src/test/rustdoc-ui/z-help.stdout b/src/test/rustdoc-ui/z-help.stdout
index 749abe364..46f11d2e5 100644
--- a/src/test/rustdoc-ui/z-help.stdout
+++ b/src/test/rustdoc-ui/z-help.stdout
@@ -1,8 +1,8 @@
-Z allow-features=val -- only allow the listed language features to be enabled in code (space separated)
-Z always-encode-mir=val -- encode MIR of all functions into the crate metadata (default: no)
- -Z assume-incomplete-release=val -- make cfg(version) treat the current version as incomplete (default: no)
-Z asm-comments=val -- generate comments into the assembly (may change behavior) (default: no)
-Z assert-incr-state=val -- assert that the incremental cache is in given state: either `loaded` or `not-loaded`.
+ -Z assume-incomplete-release=val -- make cfg(version) treat the current version as incomplete (default: no)
-Z binary-dep-depinfo=val -- include artifacts (sysroot, crate dependencies) used during compilation in dep-info (default: no)
-Z box-noalias=val -- emit noalias metadata for box (default: yes)
-Z branch-protection=val -- set options for branch target identification and pointer authentication on AArch64
@@ -17,6 +17,7 @@
-Z deduplicate-diagnostics=val -- deduplicate identical diagnostics (default: yes)
-Z dep-info-omit-d-target=val -- in dep-info output, omit targets for tracking dependencies of the dep-info files themselves (default: no)
-Z dep-tasks=val -- print tasks that execute and the color their dep node gets (requires debug build) (default: no)
+ -Z diagnostic-width=val -- set the current output width for diagnostic truncation
-Z dlltool=val -- import library generation tool (windows-gnu only)
-Z dont-buffer-diagnostics=val -- emit diagnostics rather than buffering (breaks NLL error downgrading, sorting) (default: no)
-Z drop-tracking=val -- enables drop tracking in generators (default: no)
@@ -35,6 +36,7 @@
-Z dump-mir-graphviz=val -- in addition to `.mir` files, create graphviz `.dot` files (and with `-Z instrument-coverage`, also create a `.dot` file for the MIR-derived coverage graph) (default: no)
-Z dump-mir-spanview=val -- in addition to `.mir` files, create `.html` files to view spans for all `statement`s (including terminators), only `terminator` spans, or computed `block` spans (one span encompassing a block's terminator and all statements). If `-Z instrument-coverage` is also enabled, create an additional `.html` file showing the computed coverage spans.
-Z dwarf-version=val -- version of DWARF debug information to emit (default: 2 or 4, depending on platform)
+ -Z dylib-lto=val -- enables LTO for dylib crate type
-Z emit-stack-sizes=val -- emit a section containing stack size metadata (default: no)
-Z emit-thin-lto=val -- emit the bc module with thin LTO info (default: yes)
-Z export-executable-symbols=val -- export symbols from executables, as if they were dynamic libraries
@@ -54,11 +56,11 @@
-Z incremental-info=val -- print high-level information about incremental reuse (or the lack thereof) (default: no)
-Z incremental-relative-spans=val -- hash spans relative to their parent item for incr. comp. (default: no)
-Z incremental-verify-ich=val -- verify incr. comp. hashes of green query instances (default: no)
+ -Z inline-in-all-cgus=val -- control whether `#[inline]` functions are in all CGUs
-Z inline-llvm=val -- enable LLVM inlining (default: yes)
-Z inline-mir=val -- enable MIR inlining (default: no)
- -Z inline-mir-threshold=val -- a default MIR inlining threshold (default: 50)
-Z inline-mir-hint-threshold=val -- inlining threshold for functions with inline hint (default: 100)
- -Z inline-in-all-cgus=val -- control whether `#[inline]` functions are in all CGUs
+ -Z inline-mir-threshold=val -- a default MIR inlining threshold (default: 50)
-Z input-stats=val -- gather statistics about the input (default: no)
-Z instrument-coverage=val -- instrument the generated code to support LLVM source-based code coverage reports (note, the compiler build config must include `profiler = true`); implies `-C symbol-mangling-version=v0`. Optional values are:
`=all` (implicit value)
@@ -67,6 +69,7 @@
`=off` (default)
-Z instrument-mcount=val -- insert function instrument code for mcount-based tracing (default: no)
-Z keep-hygiene-data=val -- keep hygiene data after analysis (default: no)
+ -Z layout-seed=val -- seed layout randomization
-Z link-native-libraries=val -- link native libraries in the linker invocation (default: yes)
-Z link-only=val -- link the `.rlink` file generated by `-Z no-link` (default: no)
-Z llvm-plugins=val -- a list LLVM plugins to enable (space separated)
@@ -78,11 +81,10 @@
-Z meta-stats=val -- gather metadata statistics (default: no)
-Z mir-emit-retag=val -- emit Retagging MIR statements, interpreted e.g., by miri; implies -Zmir-opt-level=0 (default: no)
-Z mir-enable-passes=val -- use like `-Zmir-enable-passes=+DestProp,-InstCombine`. Forces the specified passes to be enabled, overriding all other checks. Passes that are not specified are enabled or disabled by other flags as usual.
- -Z mir-pretty-relative-line-numbers=val -- use line numbers relative to the function in mir pretty printing
-Z mir-opt-level=val -- MIR optimization level (0-4; default: 1 in non optimized builds and 2 in optimized builds)
+ -Z mir-pretty-relative-line-numbers=val -- use line numbers relative to the function in mir pretty printing
-Z move-size-limit=val -- the size at which the `large_assignments` lint starts to be emitted
-Z mutable-noalias=val -- emit noalias metadata for mutable references (default: yes)
- -Z new-llvm-pass-manager=val -- use new LLVM pass manager (default: no)
-Z nll-facts=val -- dump facts from NLL analysis into side files (default: no)
-Z nll-facts-dir=val -- the directory the NLL facts are dumped into (default: `nll-facts`)
-Z no-analysis=val -- parse and expand the source, but run no analysis
@@ -92,12 +94,11 @@
-Z no-leak-check=val -- disable the 'leak check' for subtyping; unsound, but useful for tests
-Z no-link=val -- compile without linking
-Z no-parallel-llvm=val -- run LLVM in non-parallel mode (while keeping codegen-units and ThinLTO)
- -Z no-unique-section-names=val -- do not use unique names for text and data sections when -Z function-sections is used
-Z no-profiler-runtime=val -- prevent automatic injection of the profiler_builtins crate
+ -Z no-unique-section-names=val -- do not use unique names for text and data sections when -Z function-sections is used
-Z normalize-docs=val -- normalize associated items in rustdoc when generating documentation
-Z oom=val -- panic strategy for out-of-memory handling
-Z osx-rpath-install-name=val -- pass `-install_name @rpath/...` to the macOS linker (default: no)
- -Z diagnostic-width=val -- set the current output width for diagnostic truncation
-Z packed-bundled-libs=val -- change rlib format to store native libraries as archives
-Z panic-abort-tests=val -- support compiling tests with panic=abort (default: no)
-Z panic-in-drop=val -- panic strategy for panics in drops
@@ -121,15 +122,13 @@
-Z profile=val -- insert profiling code (default: no)
-Z profile-closures=val -- profile size of closures
-Z profile-emit=val -- file path to emit profiling data at runtime when using 'profile' (default based on relative source path)
- -Z profiler-runtime=val -- name of the profiler runtime crate to automatically inject (default: `profiler_builtins`)
-Z profile-sample-use=val -- use the given `.prof` file for sampled profile-guided optimization (also known as AutoFDO)
+ -Z profiler-runtime=val -- name of the profiler runtime crate to automatically inject (default: `profiler_builtins`)
-Z query-dep-graph=val -- enable queries of the dependency graph for regression testing (default: no)
-Z randomize-layout=val -- randomize the layout of types (default: no)
- -Z layout-seed=val -- seed layout randomization
-Z relax-elf-relocations=val -- whether ELF relocations can be relaxed
-Z relro-level=val -- choose which RELRO level to use
-Z remap-cwd-prefix=val -- remap paths under the current working directory to this path prefix
- -Z simulate-remapped-rust-src-base=val -- simulate the effect of remap-debuginfo = true at bootstrapping by remapping path to rust's source base directory. only meant for testing purposes
-Z report-delayed-bugs=val -- immediately print bugs registered with `delay_span_bug` (default: no)
-Z sanitizer=val -- use a sanitizer
-Z sanitizer-memory-track-origins=val -- enable origins tracking in MemorySanitizer
@@ -137,22 +136,20 @@
-Z saturating-float-casts=val -- make float->int casts UB-free: numbers outside the integer type's range are clipped to the max/min integer respectively, and NaN is mapped to 0 (default: yes)
-Z save-analysis=val -- write syntax and type analysis (in JSON format) information, in addition to normal output (default: no)
-Z self-profile=val -- run the self profiler and output the raw event data
- -Z self-profile-events=val -- specify the events recorded by the self profiler;
- for example: `-Z self-profile-events=default,query-keys`
- all options: none, all, default, generic-activity, query-provider, query-cache-hit
- query-blocked, incr-cache-load, incr-result-hashing, query-keys, function-args, args, llvm, artifact-sizes
-Z self-profile-counter=val -- counter used by the self profiler (default: `wall-time`), one of:
`wall-time` (monotonic clock, i.e. `std::time::Instant`)
`instructions:u` (retired instructions, userspace-only)
`instructions-minus-irqs:u` (subtracting hardware interrupt counts for extra accuracy)
+ -Z self-profile-events=val -- specify the events recorded by the self profiler;
+ for example: `-Z self-profile-events=default,query-keys`
+ all options: none, all, default, generic-activity, query-provider, query-cache-hit
+ query-blocked, incr-cache-load, incr-result-hashing, query-keys, function-args, args, llvm, artifact-sizes
-Z share-generics=val -- make the current crate share its generic instantiations
-Z show-span=val -- show spans for compiler debugging (expr|pat|ty)
+ -Z simulate-remapped-rust-src-base=val -- simulate the effect of remap-debuginfo = true at bootstrapping by remapping path to rust's source base directory. only meant for testing purposes
-Z span-debug=val -- forward proc_macro::Span's `Debug` impl to `Span`
-Z span-free-formats=val -- exclude spans when debug-printing compiler state (default: no)
- -Z src-hash-algorithm=val -- hash algorithm of source files in debug info (`md5`, `sha1`, or `sha256`)
- -Z stack-protector=val -- control stack smash protection strategy (`rustc --print stack-protector-strategies` for details)
- -Z strict-init-checks=val -- control if mem::uninitialized and mem::zeroed panic on more UB
- -Z strip=val -- tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)
+ -Z split-dwarf-inlining=val -- provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF
-Z split-dwarf-kind=val -- split dwarf variant (only if -Csplit-debuginfo is enabled and on relevant platform)
(default: `split`)
@@ -160,26 +157,28 @@
file which is ignored by the linker
`single`: sections which do not require relocation are written into object file but ignored
by the linker
- -Z split-dwarf-inlining=val -- provide minimal debug info in the object/executable to facilitate online symbolication/stack traces in the absence of .dwo/.dwp files when using Split DWARF
+ -Z src-hash-algorithm=val -- hash algorithm of source files in debug info (`md5`, `sha1`, or `sha256`)
+ -Z stack-protector=val -- control stack smash protection strategy (`rustc --print stack-protector-strategies` for details)
+ -Z strict-init-checks=val -- control if mem::uninitialized and mem::zeroed panic on more UB
+ -Z strip=val -- tell the linker which information to strip (`none` (default), `debuginfo` or `symbols`)
-Z symbol-mangling-version=val -- which mangling version to use for symbol names ('legacy' (default) or 'v0')
-Z teach=val -- show extended diagnostic help (default: no)
-Z temps-dir=val -- the directory the intermediate files are written to
- -Z translate-lang=val -- language identifier for diagnostic output
- -Z translate-additional-ftl=val -- additional fluent translation to preferentially use (for testing translation)
- -Z translate-directionality-markers=val -- emit directionality isolation markers in translated diagnostics
- -Z tune-cpu=val -- select processor to schedule for (`rustc --print target-cpus` for details)
-Z thinlto=val -- enable ThinLTO when possible
-Z thir-unsafeck=val -- use the THIR unsafety checker (default: no)
-Z threads=val -- use a thread pool with N threads
- -Z time=val -- measure time of rustc processes (default: no)
-Z time-llvm-passes=val -- measure time of each LLVM pass (default: no)
-Z time-passes=val -- measure time of each rustc pass (default: no)
-Z tls-model=val -- choose the TLS model to use (`rustc --print tls-models` for details)
-Z trace-macros=val -- for every macro invocation, print its name and arguments (default: no)
+ -Z translate-additional-ftl=val -- additional fluent translation to preferentially use (for testing translation)
+ -Z translate-directionality-markers=val -- emit directionality isolation markers in translated diagnostics
+ -Z translate-lang=val -- language identifier for diagnostic output
-Z translate-remapped-path-to-local-path=val -- translate remapped paths into local paths when possible (default: yes)
-Z trap-unreachable=val -- generate trap instructions for unreachable intrinsics (default: use target setting, usually yes)
-Z treat-err-as-bug=val -- treat error number `val` that occurs as bug
-Z trim-diagnostic-paths=val -- in diagnostics, use heuristics to shorten paths referring to items
+ -Z tune-cpu=val -- select processor to schedule for (`rustc --print target-cpus` for details)
-Z ui-testing=val -- emit compiler diagnostics in a form suitable for UI testing (default: no)
-Z uninit-const-chunk-threshold=val -- allow generating const initializers with mixed init/uninit chunks, and set the maximum number of chunks for which this is allowed (default: 16)
-Z unleash-the-miri-inside-of-you=val -- take the brakes off const evaluation. NOTE: this is unsound (default: no)