Remove all eight DiagnosticBuilder::*_with_code
methods.
These all have relatively low use, and can be perfectly emulated with a simpler construction method combined with `code` or `code_mv`.
This commit is contained in:
parent
bd4e623485
commit
6682f243dc
14 changed files with 84 additions and 180 deletions
|
@ -944,13 +944,13 @@ impl<'a, 'tcx> Resolver<'a, 'tcx> {
|
|||
trait_item_span,
|
||||
trait_path,
|
||||
} => {
|
||||
self.dcx().struct_span_err_with_code(
|
||||
self.dcx().struct_span_err(
|
||||
span,
|
||||
format!(
|
||||
"item `{name}` is an associated {kind}, which doesn't match its trait `{trait_path}`",
|
||||
),
|
||||
code,
|
||||
)
|
||||
.code_mv(code)
|
||||
.span_label_mv(span, "does not match trait")
|
||||
.span_label_mv(trait_item_span, "item in trait")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue