@@ -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;
@@ -1370,15 +1370,11 @@ pub(crate) struct DuplicateLangItem {
1370
1370
impl < G : EmissionGuarantee > Diagnostic < ' _ , G > for DuplicateLangItem {
1371
1371
#[ track_caller]
1372
1372
fn into_diag ( self , dcx : DiagCtxtHandle < ' _ > , level : Level ) -> Diag < ' _ , G > {
1373
- let mut diag = Diag :: new (
1374
- dcx,
1375
- level,
1376
- match self . duplicate {
1377
- Duplicate :: Plain => fluent:: passes_duplicate_lang_item,
1378
- Duplicate :: Crate => fluent:: passes_duplicate_lang_item_crate,
1379
- Duplicate :: CrateDepends => fluent:: passes_duplicate_lang_item_crate_depends,
1380
- } ,
1381
- ) ;
1373
+ let mut diag = Diag :: new ( dcx, level, match self . duplicate {
1374
+ Duplicate :: Plain => fluent:: passes_duplicate_lang_item,
1375
+ Duplicate :: Crate => fluent:: passes_duplicate_lang_item_crate,
1376
+ Duplicate :: CrateDepends => fluent:: passes_duplicate_lang_item_crate_depends,
1377
+ } ) ;
1382
1378
diag. code ( E0152 ) ;
1383
1379
diag. arg ( "lang_item_name" , self . lang_item_name ) ;
1384
1380
diag. arg ( "crate_name" , self . crate_name ) ;
0 commit comments