Skip to content

Commit 2afc270

Browse files
committed
Rename rustdoc lints to be a tool lint instead of built-in.
- Rename `broken_intra_doc_links` to `rustdoc::broken_intra_doc_links` - Ensure that the old lint names still work and give deprecation errors - Register lints even when running doctests Otherwise, all `rustdoc::` lints would be ignored. - Register all existing lints as removed This unfortunately doesn't work with `register_renamed` because tool lints have not yet been registered when rustc is running. For similar reasons, `check_backwards_compat` doesn't work either. Call `register_removed` directly instead. - Fix fallout + Rustdoc lints for compiler/ + Rustdoc lints for library/ Note that this does *not* suggest `rustdoc::broken_intra_doc_links` for `rustdoc::intra_doc_link_resolution_failure`, since there was no time when the latter was valid.
1 parent 27b39c9 commit 2afc270

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ pub mod primitive;
297297
unused_imports,
298298
unsafe_op_in_unsafe_fn
299299
)]
300-
#[allow(non_autolinks)]
300+
#[cfg_attr(bootstrap, allow(non_autolinks))]
301+
#[cfg_attr(not(bootstrap), allow(rustdoc::non_autolinks))]
301302
// FIXME: This annotation should be moved into rust-lang/stdarch after clashing_extern_declarations is
302303
// merged. It currently cannot because bootstrap fails as the lint hasn't been defined yet.
303304
#[allow(clashing_extern_declarations)]

0 commit comments

Comments
 (0)