Skip to content

Commit 798a207

Browse files
committed
Fix of bug introduced by rust-lang#53762
1 parent fea32f1 commit 798a207

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/librustc/lint/context.rs

+9-1
Original file line numberDiff line numberDiff line change
@@ -319,7 +319,15 @@ impl LintStore {
319319
CheckLintNameResult::NoLint => {
320320
Some(struct_err!(sess, E0602, "unknown lint: `{}`", lint_name))
321321
}
322-
CheckLintNameResult::Tool(_) => unreachable!(),
322+
CheckLintNameResult::Tool(result) => match result {
323+
Err((Some(_), new_name)) => Some(sess.struct_warn(&format!(
324+
"lint name `{}` is deprcated \
325+
and does not have an effect anymore. \
326+
Use: {}",
327+
lint_name, new_name
328+
))),
329+
_ => None,
330+
},
323331
};
324332

325333
if let Some(mut db) = db {

0 commit comments

Comments
 (0)