@@ -10,7 +10,7 @@ use rustc_errors::{
10
10
use rustc_hir:: { self as hir, ExprKind , Target } ;
11
11
use rustc_macros:: { Diagnostic , LintDiagnostic , Subdiagnostic } ;
12
12
use rustc_middle:: ty:: { MainDefinition , Ty } ;
13
- use rustc_span:: { Span , Symbol , DUMMY_SP } ;
13
+ use rustc_span:: { DUMMY_SP , Span , Symbol } ;
14
14
15
15
use crate :: check_attr:: ProcMacroKind ;
16
16
use crate :: fluent_generated as fluent;
@@ -1377,15 +1377,11 @@ pub(crate) struct DuplicateLangItem {
1377
1377
impl < G : EmissionGuarantee > Diagnostic < ' _ , G > for DuplicateLangItem {
1378
1378
#[ track_caller]
1379
1379
fn into_diag ( self , dcx : DiagCtxtHandle < ' _ > , level : Level ) -> Diag < ' _ , G > {
1380
- let mut diag = Diag :: new (
1381
- dcx,
1382
- level,
1383
- match self . duplicate {
1384
- Duplicate :: Plain => fluent:: passes_duplicate_lang_item,
1385
- Duplicate :: Crate => fluent:: passes_duplicate_lang_item_crate,
1386
- Duplicate :: CrateDepends => fluent:: passes_duplicate_lang_item_crate_depends,
1387
- } ,
1388
- ) ;
1380
+ let mut diag = Diag :: new ( dcx, level, match self . duplicate {
1381
+ Duplicate :: Plain => fluent:: passes_duplicate_lang_item,
1382
+ Duplicate :: Crate => fluent:: passes_duplicate_lang_item_crate,
1383
+ Duplicate :: CrateDepends => fluent:: passes_duplicate_lang_item_crate_depends,
1384
+ } ) ;
1389
1385
diag. code ( E0152 ) ;
1390
1386
diag. arg ( "lang_item_name" , self . lang_item_name ) ;
1391
1387
diag. arg ( "crate_name" , self . crate_name ) ;
0 commit comments