diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-03 21:50:36 +1100 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2024-01-08 16:00:34 +1100 |
| commit | 6682f243dcb9babd67525bbf9798dca302f60588 (patch) | |
| tree | b6342f6aeef783fe40c65a6fa2e34ecf53bd11fe /compiler/rustc_hir_analysis/src/structured_errors | |
| parent | bd4e623485f383b478fae662a767a3129bb4b989 (diff) | |
| download | rust-6682f243dcb9babd67525bbf9798dca302f60588.tar.gz rust-6682f243dcb9babd67525bbf9798dca302f60588.zip | |
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`.
Diffstat (limited to 'compiler/rustc_hir_analysis/src/structured_errors')
| -rw-r--r-- | compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs index ae68a8bf281..04c42b4b2e6 100644 --- a/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs +++ b/compiler/rustc_hir_analysis/src/structured_errors/wrong_number_of_generic_args.rs @@ -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. |
