@@ -244,30 +244,30 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
244
244
}
245
245
thorin:: Error :: NamelessSection ( _, offset) => {
246
246
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}" ) ) ;
248
248
diag
249
249
}
250
250
thorin:: Error :: RelocationWithInvalidSymbol ( section, offset) => {
251
251
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}" ) ) ;
254
254
diag
255
255
}
256
256
thorin:: Error :: MultipleRelocations ( section, offset) => {
257
257
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}" ) ) ;
260
260
diag
261
261
}
262
262
thorin:: Error :: UnsupportedRelocation ( section, offset) => {
263
263
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}" ) ) ;
266
266
diag
267
267
}
268
268
thorin:: Error :: MissingDwoName ( id) => {
269
269
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}" ) ) ;
271
271
diag
272
272
}
273
273
thorin:: Error :: NoCompilationUnits => {
@@ -284,7 +284,7 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
284
284
}
285
285
thorin:: Error :: MissingRequiredSection ( section) => {
286
286
diag = build ( fluent:: codegen_ssa_thorin_missing_required_section) ;
287
- diag. set_arg ( "section" , section) ;
287
+ diag. arg ( "section" , section) ;
288
288
diag
289
289
}
290
290
thorin:: Error :: ParseUnitAbbreviations ( _) => {
@@ -305,34 +305,34 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
305
305
}
306
306
thorin:: Error :: IncompatibleIndexVersion ( section, format, actual) => {
307
307
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) ;
311
311
diag
312
312
}
313
313
thorin:: Error :: OffsetAtIndex ( _, index) => {
314
314
diag = build ( fluent:: codegen_ssa_thorin_offset_at_index) ;
315
- diag. set_arg ( "index" , index) ;
315
+ diag. arg ( "index" , index) ;
316
316
diag
317
317
}
318
318
thorin:: Error :: StrAtOffset ( _, offset) => {
319
319
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}" ) ) ;
321
321
diag
322
322
}
323
323
thorin:: Error :: ParseIndex ( _, section) => {
324
324
diag = build ( fluent:: codegen_ssa_thorin_parse_index) ;
325
- diag. set_arg ( "section" , section) ;
325
+ diag. arg ( "section" , section) ;
326
326
diag
327
327
}
328
328
thorin:: Error :: UnitNotInIndex ( unit) => {
329
329
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}" ) ) ;
331
331
diag
332
332
}
333
333
thorin:: Error :: RowNotInIndex ( _, row) => {
334
334
diag = build ( fluent:: codegen_ssa_thorin_row_not_in_index) ;
335
- diag. set_arg ( "row" , row) ;
335
+ diag. arg ( "row" , row) ;
336
336
diag
337
337
}
338
338
thorin:: Error :: SectionNotInRow => {
@@ -341,7 +341,7 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
341
341
}
342
342
thorin:: Error :: EmptyUnit ( unit) => {
343
343
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}" ) ) ;
345
345
diag
346
346
}
347
347
thorin:: Error :: MultipleDebugInfoSection => {
@@ -358,12 +358,12 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
358
358
}
359
359
thorin:: Error :: DuplicateUnit ( unit) => {
360
360
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}" ) ) ;
362
362
diag
363
363
}
364
364
thorin:: Error :: MissingReferencedUnit ( unit) => {
365
365
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}" ) ) ;
367
367
diag
368
368
}
369
369
thorin:: Error :: NoOutputObjectCreated => {
@@ -376,27 +376,27 @@ impl<G: EmissionGuarantee> IntoDiagnostic<'_, G> for ThorinErrorWrapper {
376
376
}
377
377
thorin:: Error :: Io ( e) => {
378
378
diag = build ( fluent:: codegen_ssa_thorin_io) ;
379
- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
379
+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
380
380
diag
381
381
}
382
382
thorin:: Error :: ObjectRead ( e) => {
383
383
diag = build ( fluent:: codegen_ssa_thorin_object_read) ;
384
- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
384
+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
385
385
diag
386
386
}
387
387
thorin:: Error :: ObjectWrite ( e) => {
388
388
diag = build ( fluent:: codegen_ssa_thorin_object_write) ;
389
- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
389
+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
390
390
diag
391
391
}
392
392
thorin:: Error :: GimliRead ( e) => {
393
393
diag = build ( fluent:: codegen_ssa_thorin_gimli_read) ;
394
- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
394
+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
395
395
diag
396
396
}
397
397
thorin:: Error :: GimliWrite ( e) => {
398
398
diag = build ( fluent:: codegen_ssa_thorin_gimli_write) ;
399
- diag. set_arg ( "error" , format ! ( "{e}" ) ) ;
399
+ diag. arg ( "error" , format ! ( "{e}" ) ) ;
400
400
diag
401
401
}
402
402
_ => unimplemented ! ( "Untranslated thorin error" ) ,
@@ -414,8 +414,8 @@ pub struct LinkingFailed<'a> {
414
414
impl < G : EmissionGuarantee > IntoDiagnostic < ' _ , G > for LinkingFailed < ' _ > {
415
415
fn into_diagnostic ( self , dcx : & DiagCtxt , level : Level ) -> DiagnosticBuilder < ' _ , G > {
416
416
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) ) ;
419
419
420
420
let contains_undefined_ref = self . escaped_output . contains ( "undefined reference to" ) ;
421
421
0 commit comments