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
|
@ -523,8 +523,7 @@ impl<'a, 'tcx> WrongNumberOfGenericArgs<'a, 'tcx> {
|
|||
fn start_diagnostics(&self) -> DiagnosticBuilder<'tcx> {
|
||||
let span = self.path_segment.ident.span;
|
||||
let msg = self.create_error_message();
|
||||
|
||||
self.tcx.dcx().struct_span_err_with_code(span, msg, self.code())
|
||||
self.tcx.dcx().struct_span_err(span, msg).code_mv(self.code())
|
||||
}
|
||||
|
||||
/// Builds the `expected 1 type argument / supplied 2 type arguments` message.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue