11

Github Allow registering tool lints with `register_tool` by jyn514 · Pull Reques...

 3 years ago
source link: https://github.com/rust-lang/rust/pull/83216
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Copy link

Member

jyn514 commented 15 days ago

Previously, there was no way to add a custom tool prefix, even if the tool
itself had registered a lint:

#![feature(register_tool)]
#![register_tool(xyz)]
#![warn(xyz::my_lint)]
$ rustc unknown-lint.rs  --crate-type lib
error[E0710]: an unknown tool name found in scoped lint: `xyz::my_lint`
 --> unknown-lint.rs:3:9
  |
3 | #![warn(xyz::my_lint)]
  |         ^^^

This allows opting-in to lints from other tools using register_tool.

cc #66079 (comment), @chorman0773
r? @petrochenkov


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK