Skip to content

Renaming a tool lint to another tool lint does not apply the warning #83598

Closed
@jyn514

Description

@jyn514

Similar to #82615, but the source lint is a tool lint this time.

I tried this code:

#![deny(rustdoc::non_autolinks)]
//! http://example.com

and renamed non_autolinks in a fork of rust-lang/rust.

I expected to see this happen: Rustdoc warns that the lint is renamed and still applies the lint.

Instead, this happened: Rustdoc warns that the lint is renamed, but does not apply the lint.

warning: lint `rustdoc::non_autolinks` has been renamed to `rustdoc::bare_urls`
  --> /home/joshua/rustc/src/test/rustdoc-ui/url-improvements.rs:1:9
   |
LL | #![deny(rustdoc::non_autolinks)]
   |         ^^^^^^^^^^^^^^^^^^^^^^ help: use the new name: `rustdoc::bare_urls`
   |
   = note: `#[warn(renamed_and_removed_lints)]` on by default
warning: this URL is not a hyperlink
  --> /home/joshua/rustc/src/test/rustdoc-ui/url-improvements.rs:2:5
   |
LL | /// https://example.com
   |     ^^^^^^^^^^^^^^^^^^^^^^^ help: use an automatic link instead: `<https://example.com>`

Meta

Version: 59d7295

Metadata

Metadata

Assignees

Labels

A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.C-bugCategory: This is a bug.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions