lint: port unused import braces diagnostics

Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
David Wood 2022-06-28 10:32:57 +01:00
parent fc4f8d9bc2
commit e24833869f
2 changed files with 3 additions and 1 deletions

View File

@ -281,3 +281,5 @@ lint-path-statement-no-effect = path statement with no effect
lint-unused-delim = unnecessary {$delim} around {$item}
.suggestion = remove these {$delim}
lint-unused-import-braces = braces around {$node} is unnecessary

View File

@ -1118,7 +1118,7 @@ fn check_use_tree(&self, cx: &EarlyContext<'_>, use_tree: &ast::UseTree, item: &
};
cx.struct_span_lint(UNUSED_IMPORT_BRACES, item.span, |lint| {
lint.build(&format!("braces around {} is unnecessary", node_name)).emit();
lint.build(fluent::lint::unused_import_braces).set_arg("node", node_name).emit();
});
}
}