@@ -1356,12 +1356,12 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
1356
1356
GenericParamDefKind :: Lifetime => { }
1357
1357
GenericParamDefKind :: Type { has_default, .. } => {
1358
1358
if has_default {
1359
- self . visit ( self . tcx . type_of ( param. def_id ) . instantiate_identity ( ) ) ;
1359
+ let _ = self . visit ( self . tcx . type_of ( param. def_id ) . instantiate_identity ( ) ) ;
1360
1360
}
1361
1361
}
1362
1362
// FIXME(generic_const_exprs): May want to look inside const here
1363
1363
GenericParamDefKind :: Const { .. } => {
1364
- self . visit ( self . tcx . type_of ( param. def_id ) . instantiate_identity ( ) ) ;
1364
+ let _ = self . visit ( self . tcx . type_of ( param. def_id ) . instantiate_identity ( ) ) ;
1365
1365
}
1366
1366
}
1367
1367
}
@@ -1376,19 +1376,19 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
1376
1376
// consider the ones that the user wrote. This is important
1377
1377
// for the inferred outlives rules; see
1378
1378
// `tests/ui/rfc-2093-infer-outlives/privacy.rs`.
1379
- self . visit_predicates ( self . tcx . explicit_predicates_of ( self . item_def_id ) ) ;
1379
+ let _ = self . visit_predicates ( self . tcx . explicit_predicates_of ( self . item_def_id ) ) ;
1380
1380
self
1381
1381
}
1382
1382
1383
1383
fn bounds ( & mut self ) -> & mut Self {
1384
1384
self . in_primary_interface = false ;
1385
- self . visit_clauses ( self . tcx . explicit_item_bounds ( self . item_def_id ) . skip_binder ( ) ) ;
1385
+ let _ = self . visit_clauses ( self . tcx . explicit_item_bounds ( self . item_def_id ) . skip_binder ( ) ) ;
1386
1386
self
1387
1387
}
1388
1388
1389
1389
fn ty ( & mut self ) -> & mut Self {
1390
1390
self . in_primary_interface = true ;
1391
- self . visit ( self . tcx . type_of ( self . item_def_id ) . instantiate_identity ( ) ) ;
1391
+ let _ = self . visit ( self . tcx . type_of ( self . item_def_id ) . instantiate_identity ( ) ) ;
1392
1392
self
1393
1393
}
1394
1394
@@ -1780,7 +1780,7 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
1780
1780
1781
1781
let module = tcx. hir_module_items ( module_def_id) ;
1782
1782
for def_id in module. definitions ( ) {
1783
- rustc_ty_utils:: sig_types:: walk_types ( tcx, def_id, & mut visitor) ;
1783
+ let _ = rustc_ty_utils:: sig_types:: walk_types ( tcx, def_id, & mut visitor) ;
1784
1784
1785
1785
if let Some ( body_id) = tcx. hir_maybe_body_owned_by ( def_id) {
1786
1786
visitor. visit_nested_body ( body_id. id ( ) ) ;
@@ -1793,7 +1793,11 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
1793
1793
let trait_ref = tcx. impl_trait_ref ( id. owner_id . def_id ) . unwrap ( ) ;
1794
1794
let trait_ref = trait_ref. instantiate_identity ( ) ;
1795
1795
visitor. span = item. path . span ;
1796
- visitor. visit_def_id ( trait_ref. def_id , "trait" , & trait_ref. print_only_trait_path ( ) ) ;
1796
+ let _ = visitor. visit_def_id (
1797
+ trait_ref. def_id ,
1798
+ "trait" ,
1799
+ & trait_ref. print_only_trait_path ( ) ,
1800
+ ) ;
1797
1801
}
1798
1802
}
1799
1803
}
0 commit comments