@@ -244,30 +244,30 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
244244 }
245245 thorin:: Error :: NamelessSection ( _, offset) => {
246246 diag = build ( fluent:: codegen_ssa_thorin_section_without_name) ;
247- diag. set_arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
247+ diag. arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
248248 diag
249249 }
250250 thorin:: Error :: RelocationWithInvalidSymbol ( section, offset) => {
251251 diag = build ( fluent:: codegen_ssa_thorin_relocation_with_invalid_symbol) ;
252- diag. set_arg ( "section" , section) ;
253- diag. set_arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
252+ diag. arg ( "section" , section) ;
253+ diag. arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
254254 diag
255255 }
256256 thorin:: Error :: MultipleRelocations ( section, offset) => {
257257 diag = build ( fluent:: codegen_ssa_thorin_multiple_relocations) ;
258- diag. set_arg ( "section" , section) ;
259- diag. set_arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
258+ diag. arg ( "section" , section) ;
259+ diag. arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
260260 diag
261261 }
262262 thorin:: Error :: UnsupportedRelocation ( section, offset) => {
263263 diag = build ( fluent:: codegen_ssa_thorin_unsupported_relocation) ;
264- diag. set_arg ( "section" , section) ;
265- diag. set_arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
264+ diag. arg ( "section" , section) ;
265+ diag. arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
266266 diag
267267 }
268268 thorin:: Error :: MissingDwoName ( id) => {
269269 diag = build ( fluent:: codegen_ssa_thorin_missing_dwo_name) ;
270- diag. set_arg ( "id" , format ! ( "0x{id:08x}" ) ) ;
270+ diag. arg ( "id" , format ! ( "0x{id:08x}" ) ) ;
271271 diag
272272 }
273273 thorin:: Error :: NoCompilationUnits => {
@@ -284,7 +284,7 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
284284 }
285285 thorin:: Error :: MissingRequiredSection ( section) => {
286286 diag = build ( fluent:: codegen_ssa_thorin_missing_required_section) ;
287- diag. set_arg ( "section" , section) ;
287+ diag. arg ( "section" , section) ;
288288 diag
289289 }
290290 thorin:: Error :: ParseUnitAbbreviations ( _) => {
@@ -305,34 +305,34 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
305305 }
306306 thorin:: Error :: IncompatibleIndexVersion ( section, format, actual) => {
307307 diag = build ( fluent:: codegen_ssa_thorin_incompatible_index_version) ;
308- diag. set_arg ( "section" , section) ;
309- diag. set_arg ( "actual" , actual) ;
310- diag. set_arg ( "format" , format) ;
308+ diag. arg ( "section" , section) ;
309+ diag. arg ( "actual" , actual) ;
310+ diag. arg ( "format" , format) ;
311311 diag
312312 }
313313 thorin:: Error :: OffsetAtIndex ( _, index) => {
314314 diag = build ( fluent:: codegen_ssa_thorin_offset_at_index) ;
315- diag. set_arg ( "index" , index) ;
315+ diag. arg ( "index" , index) ;
316316 diag
317317 }
318318 thorin:: Error :: StrAtOffset ( _, offset) => {
319319 diag = build ( fluent:: codegen_ssa_thorin_str_at_offset) ;
320- diag. set_arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
320+ diag. arg ( "offset" , format ! ( "0x{offset:08x}" ) ) ;
321321 diag
322322 }
323323 thorin:: Error :: ParseIndex ( _, section) => {
324324 diag = build ( fluent:: codegen_ssa_thorin_parse_index) ;
325- diag. set_arg ( "section" , section) ;
325+ diag. arg ( "section" , section) ;
326326 diag
327327 }
328328 thorin:: Error :: UnitNotInIndex ( unit) => {
329329 diag = build ( fluent:: codegen_ssa_thorin_unit_not_in_index) ;
330- diag. set_arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
330+ diag. arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
331331 diag
332332 }
333333 thorin:: Error :: RowNotInIndex ( _, row) => {
334334 diag = build ( fluent:: codegen_ssa_thorin_row_not_in_index) ;
335- diag. set_arg ( "row" , row) ;
335+ diag. arg ( "row" , row) ;
336336 diag
337337 }
338338 thorin:: Error :: SectionNotInRow => {
@@ -341,7 +341,7 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
341341 }
342342 thorin:: Error :: EmptyUnit ( unit) => {
343343 diag = build ( fluent:: codegen_ssa_thorin_empty_unit) ;
344- diag. set_arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
344+ diag. arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
345345 diag
346346 }
347347 thorin:: Error :: MultipleDebugInfoSection => {
@@ -358,12 +358,12 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
358358 }
359359 thorin:: Error :: DuplicateUnit ( unit) => {
360360 diag = build ( fluent:: codegen_ssa_thorin_duplicate_unit) ;
361- diag. set_arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
361+ diag. arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
362362 diag
363363 }
364364 thorin:: Error :: MissingReferencedUnit ( unit) => {
365365 diag = build ( fluent:: codegen_ssa_thorin_missing_referenced_unit) ;
366- diag. set_arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
366+ diag. arg ( "unit" , format ! ( "0x{unit:08x}" ) ) ;
367367 diag
368368 }
369369 thorin:: Error :: NoOutputObjectCreated => {
@@ -376,27 +376,27 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
376376 }
377377 thorin:: Error :: Io ( e) => {
378378 diag = build ( fluent:: codegen_ssa_thorin_io) ;
379- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
379+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
380380 diag
381381 }
382382 thorin:: Error :: ObjectRead ( e) => {
383383 diag = build ( fluent:: codegen_ssa_thorin_object_read) ;
384- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
384+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
385385 diag
386386 }
387387 thorin:: Error :: ObjectWrite ( e) => {
388388 diag = build ( fluent:: codegen_ssa_thorin_object_write) ;
389- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
389+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
390390 diag
391391 }
392392 thorin:: Error :: GimliRead ( e) => {
393393 diag = build ( fluent:: codegen_ssa_thorin_gimli_read) ;
394- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
394+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
395395 diag
396396 }
397397 thorin:: Error :: GimliWrite ( e) => {
398398 diag = build ( fluent:: codegen_ssa_thorin_gimli_write) ;
399- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
399+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
400400 diag
401401 }
402402 _ => unimplemented ! ( "Untranslated thorin error" ) ,
@@ -414,8 +414,8 @@ pub struct LinkingFailed<'a> {
414414impl < G : EmissionGuarantee > IntoDiagnostic < ' _ , G > for LinkingFailed < ' _ > {
415415 fn into_diagnostic ( self , dcx : & DiagCtxt , level : Level ) -> DiagnosticBuilder < ' _ , G > {
416416 let mut diag = DiagnosticBuilder :: new ( dcx, level, fluent:: codegen_ssa_linking_failed) ;
417- diag. set_arg ( "linker_path" , format ! ( "{}" , self . linker_path. display( ) ) ) ;
418- diag. set_arg ( "exit_status" , format ! ( "{}" , self . exit_status) ) ;
417+ diag. arg ( "linker_path" , format ! ( "{}" , self . linker_path. display( ) ) ) ;
418+ diag. arg ( "exit_status" , format ! ( "{}" , self . exit_status) ) ;
419419
420420 let contains_undefined_ref = self . escaped_output . contains ( "undefined reference to" ) ;
421421
0 commit comments