File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/rustc_privacy/src Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -1423,8 +1423,6 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
1423
1423
} ;
1424
1424
1425
1425
let vis = self . tcx . local_visibility ( local_def_id) ;
1426
- let span = self . tcx . def_span ( self . item_def_id . to_def_id ( ) ) ;
1427
- let vis_span = self . tcx . def_span ( def_id) ;
1428
1426
if self . in_assoc_ty && !vis. is_at_least ( self . required_visibility , self . tcx ) {
1429
1427
let vis_descr = match vis {
1430
1428
ty:: Visibility :: Public => "public" ,
@@ -1441,6 +1439,8 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
1441
1439
}
1442
1440
} ;
1443
1441
1442
+ let span = self . tcx . def_span ( self . item_def_id . to_def_id ( ) ) ;
1443
+ let vis_span = self . tcx . def_span ( def_id) ;
1444
1444
self . tcx . dcx ( ) . emit_err ( InPublicInterface {
1445
1445
span,
1446
1446
vis_descr,
@@ -1463,6 +1463,8 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
1463
1463
} else {
1464
1464
lint:: builtin:: PRIVATE_BOUNDS
1465
1465
} ;
1466
+ let span = self . tcx . def_span ( self . item_def_id . to_def_id ( ) ) ;
1467
+ let vis_span = self . tcx . def_span ( def_id) ;
1466
1468
self . tcx . emit_node_span_lint (
1467
1469
lint,
1468
1470
self . tcx . local_def_id_to_hir_id ( self . item_def_id ) ,
You can’t perform that action at this time.
0 commit comments