@@ -1361,12 +1361,12 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
1361
1361
GenericParamDefKind :: Lifetime => { }
1362
1362
GenericParamDefKind :: Type { has_default, .. } => {
1363
1363
if has_default {
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
// FIXME(generic_const_exprs): May want to look inside const here
1368
1368
GenericParamDefKind :: Const { .. } => {
1369
- self . visit ( self . tcx . type_of ( param. def_id ) . instantiate_identity ( ) ) ;
1369
+ let _ = self . visit ( self . tcx . type_of ( param. def_id ) . instantiate_identity ( ) ) ;
1370
1370
}
1371
1371
}
1372
1372
}
@@ -1381,19 +1381,19 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
1381
1381
// consider the ones that the user wrote. This is important
1382
1382
// for the inferred outlives rules; see
1383
1383
// `tests/ui/rfc-2093-infer-outlives/privacy.rs`.
1384
- self . visit_predicates ( self . tcx . explicit_predicates_of ( self . item_def_id ) ) ;
1384
+ let _ = self . visit_predicates ( self . tcx . explicit_predicates_of ( self . item_def_id ) ) ;
1385
1385
self
1386
1386
}
1387
1387
1388
1388
fn bounds ( & mut self ) -> & mut Self {
1389
1389
self . in_primary_interface = false ;
1390
- self . visit_clauses ( self . tcx . explicit_item_bounds ( self . item_def_id ) . skip_binder ( ) ) ;
1390
+ let _ = self . visit_clauses ( self . tcx . explicit_item_bounds ( self . item_def_id ) . skip_binder ( ) ) ;
1391
1391
self
1392
1392
}
1393
1393
1394
1394
fn ty ( & mut self ) -> & mut Self {
1395
1395
self . in_primary_interface = true ;
1396
- self . visit ( self . tcx . type_of ( self . item_def_id ) . instantiate_identity ( ) ) ;
1396
+ let _ = self . visit ( self . tcx . type_of ( self . item_def_id ) . instantiate_identity ( ) ) ;
1397
1397
self
1398
1398
}
1399
1399
@@ -1785,7 +1785,7 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
1785
1785
1786
1786
let module = tcx. hir_module_items ( module_def_id) ;
1787
1787
for def_id in module. definitions ( ) {
1788
- rustc_ty_utils:: sig_types:: walk_types ( tcx, def_id, & mut visitor) ;
1788
+ let _ = rustc_ty_utils:: sig_types:: walk_types ( tcx, def_id, & mut visitor) ;
1789
1789
1790
1790
if let Some ( body_id) = tcx. hir_maybe_body_owned_by ( def_id) {
1791
1791
visitor. visit_nested_body ( body_id. id ( ) ) ;
@@ -1798,7 +1798,11 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
1798
1798
let trait_ref = tcx. impl_trait_ref ( id. owner_id . def_id ) . unwrap ( ) ;
1799
1799
let trait_ref = trait_ref. instantiate_identity ( ) ;
1800
1800
visitor. span = item. path . span ;
1801
- visitor. visit_def_id ( trait_ref. def_id , "trait" , & trait_ref. print_only_trait_path ( ) ) ;
1801
+ let _ = visitor. visit_def_id (
1802
+ trait_ref. def_id ,
1803
+ "trait" ,
1804
+ & trait_ref. print_only_trait_path ( ) ,
1805
+ ) ;
1802
1806
}
1803
1807
}
1804
1808
}
0 commit comments