Skip to content

Commit e248338

Browse files
committed
lint: port unused import braces diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
1 parent fc4f8d9 commit e248338

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

compiler/rustc_error_messages/locales/en-US/lint.ftl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,3 +281,5 @@ lint-path-statement-no-effect = path statement with no effect
281281
282282
lint-unused-delim = unnecessary {$delim} around {$item}
283283
.suggestion = remove these {$delim}
284+
285+
lint-unused-import-braces = braces around {$node} is unnecessary

compiler/rustc_lint/src/unused.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1118,7 +1118,7 @@ impl UnusedImportBraces {
11181118
};
11191119

11201120
cx.struct_span_lint(UNUSED_IMPORT_BRACES, item.span, |lint| {
1121-
lint.build(&format!("braces around {} is unnecessary", node_name)).emit();
1121+
lint.build(fluent::lint::unused_import_braces).set_arg("node", node_name).emit();
11221122
});
11231123
}
11241124
}

0 commit comments

Comments
 (0)