lint: port unused import braces diagnostics
Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
fc4f8d9bc2
commit
e24833869f
@ -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
|
||||
|
@ -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();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user