"intra_doc_link_resolution_failure",
"use `rustdoc::broken_intra_doc_links` instead",
);
+ store.register_removed("rustdoc", "use `rustdoc::all` instead");
store.register_removed("unknown_features", "replaced by an error");
store.register_removed("unsigned_negation", "replaced by negate_unsigned feature gate");
lint_store.register_lints(&**RUSTDOC_LINTS);
lint_store.register_group(
true,
- "rustdoc",
- None,
+ "rustdoc::all",
+ Some("rustdoc"),
RUSTDOC_LINTS.iter().map(|&lint| LintId::of(lint)).collect(),
);
for lint in &*RUSTDOC_LINTS {
// compile-flags: -Z unstable-options --check
#![deny(missing_docs)]
-#![deny(rustdoc)]
+#![deny(rustdoc::all)]
//! ```rust,testharness
//~^ ERROR
note: the lint level is defined here
--> $DIR/check-fail.rs:4:9
|
-LL | #![deny(rustdoc)]
- | ^^^^^^^
- = note: `#[deny(rustdoc::missing_doc_code_examples)]` implied by `#[deny(rustdoc)]`
+LL | #![deny(rustdoc::all)]
+ | ^^^^^^^^^^^^
+ = note: `#[deny(rustdoc::missing_doc_code_examples)]` implied by `#[deny(rustdoc::all)]`
error: unknown attribute `testharness`. Did you mean `test_harness`?
--> $DIR/check-fail.rs:6:1
note: the lint level is defined here
--> $DIR/check-fail.rs:4:9
|
-LL | #![deny(rustdoc)]
- | ^^^^^^^
- = note: `#[deny(rustdoc::invalid_codeblock_attributes)]` implied by `#[deny(rustdoc)]`
+LL | #![deny(rustdoc::all)]
+ | ^^^^^^^^^^^^
+ = 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
error: unknown attribute `testharness`. Did you mean `test_harness`?
#![warn(missing_docs)]
//~^ WARN
//~^^ WARN
-#![warn(rustdoc)]
+#![warn(rustdoc::all)]
pub fn foo() {}
//~^ WARN
LL | / #![warn(missing_docs)]
LL | |
LL | |
-LL | | #![warn(rustdoc)]
+LL | | #![warn(rustdoc::all)]
LL | |
LL | | pub fn foo() {}
| |_______________^
note: the lint level is defined here
--> $DIR/check.rs:7:9
|
-LL | #![warn(rustdoc)]
- | ^^^^^^^
- = note: `#[warn(rustdoc::missing_crate_level_docs)]` implied by `#[warn(rustdoc)]`
+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/nightly/rustdoc/how-to-write-documentation.html
LL | / #![warn(missing_docs)]
LL | |
LL | |
-LL | | #![warn(rustdoc)]
+LL | | #![warn(rustdoc::all)]
LL | |
LL | | pub fn foo() {}
| |_______________^
note: the lint level is defined here
--> $DIR/check.rs:7:9
|
-LL | #![warn(rustdoc)]
- | ^^^^^^^
- = note: `#[warn(rustdoc::missing_doc_code_examples)]` implied by `#[warn(rustdoc)]`
+LL | #![warn(rustdoc::all)]
+ | ^^^^^^^^^^^^
+ = note: `#[warn(rustdoc::missing_doc_code_examples)]` implied by `#[warn(rustdoc::all)]`
warning: missing code example in this documentation
--> $DIR/check.rs:9:1
//! println!("sup");
//! ```
-#![deny(rustdoc)]
+#![deny(rustdoc::all)]
/// what up, let's make an [error]
///
note: the lint level is defined here
--> $DIR/lint-group.rs:7:9
|
-LL | #![deny(rustdoc)]
- | ^^^^^^^
- = note: `#[deny(rustdoc::missing_doc_code_examples)]` implied by `#[deny(rustdoc)]`
+LL | #![deny(rustdoc::all)]
+ | ^^^^^^^^^^^^
+ = note: `#[deny(rustdoc::missing_doc_code_examples)]` implied by `#[deny(rustdoc::all)]`
error: documentation test in private item
--> $DIR/lint-group.rs:19:1
note: the lint level is defined here
--> $DIR/lint-group.rs:7:9
|
-LL | #![deny(rustdoc)]
- | ^^^^^^^
- = note: `#[deny(rustdoc::private_doc_tests)]` implied by `#[deny(rustdoc)]`
+LL | #![deny(rustdoc::all)]
+ | ^^^^^^^^^^^^
+ = note: `#[deny(rustdoc::private_doc_tests)]` implied by `#[deny(rustdoc::all)]`
error: missing code example in this documentation
--> $DIR/lint-group.rs:26:1
note: the lint level is defined here
--> $DIR/lint-group.rs:7:9
|
-LL | #![deny(rustdoc)]
- | ^^^^^^^
- = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(rustdoc)]`
+LL | #![deny(rustdoc::all)]
+ | ^^^^^^^^^^^^
+ = note: `#[deny(rustdoc::broken_intra_doc_links)]` implied by `#[deny(rustdoc::all)]`
= help: to escape `[` and `]` characters, add '\' before them like `\[` or `\]`
error: unclosed HTML tag `unknown`
note: the lint level is defined here
--> $DIR/lint-group.rs:7:9
|
-LL | #![deny(rustdoc)]
- | ^^^^^^^
- = note: `#[deny(rustdoc::invalid_html_tags)]` implied by `#[deny(rustdoc)]`
+LL | #![deny(rustdoc::all)]
+ | ^^^^^^^^^^^^
+ = note: `#[deny(rustdoc::invalid_html_tags)]` implied by `#[deny(rustdoc::all)]`
error: aborting due to 5 previous errors
#![deny(non_autolinks)]
//~^ ERROR renamed to `rustdoc::non_autolinks`
+#![deny(rustdoc)]
+//~^ ERROR removed: use `rustdoc::all` instead
+
// Explicitly don't try to handle this case, it was never valid
#![deny(rustdoc::intra_doc_link_resolution_failure)]
//~^ ERROR unknown lint
LL | #![deny(non_autolinks)]
| ^^^^^^^^^^^^^ help: use the new name: `rustdoc::non_autolinks`
+error: lint `rustdoc` has been removed: use `rustdoc::all` instead
+ --> $DIR/unknown-renamed-lints.rs:15:9
+ |
+LL | #![deny(rustdoc)]
+ | ^^^^^^^
+
error: unknown lint: `rustdoc::intra_doc_link_resolution_failure`
- --> $DIR/unknown-renamed-lints.rs:16:9
+ --> $DIR/unknown-renamed-lints.rs:19:9
|
LL | #![deny(rustdoc::intra_doc_link_resolution_failure)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
error: Compilation failed, aborting rustdoc
-error: aborting due to 6 previous errors
+error: aborting due to 7 previous errors
--- /dev/null
+// check-pass
+// compile-flags: --crate-type lib
+#![deny(rustdoc)]
+//~^ WARNING removed: use `rustdoc::all`
+#![deny(rustdoc::all)] // has no effect when run with rustc directly
--- /dev/null
+warning: lint `rustdoc` has been removed: use `rustdoc::all` instead
+ --> $DIR/rustdoc-group.rs:3:9
+ |
+LL | #![deny(rustdoc)]
+ | ^^^^^^^
+ |
+ = note: `#[warn(renamed_and_removed_lints)]` on by default
+
+warning: 1 warning emitted
+