@@ -1356,12 +1356,12 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
13561356 GenericParamDefKind :: Lifetime => { }
13571357 GenericParamDefKind :: Type { has_default, .. } => {
13581358 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 ( ) ) ;
13601360 }
13611361 }
13621362 // FIXME(generic_const_exprs): May want to look inside const here
13631363 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 ( ) ) ;
13651365 }
13661366 }
13671367 }
@@ -1376,19 +1376,19 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
13761376 // consider the ones that the user wrote. This is important
13771377 // for the inferred outlives rules; see
13781378 // `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 ) ) ;
13801380 self
13811381 }
13821382
13831383 fn bounds ( & mut self ) -> & mut Self {
13841384 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 ( ) ) ;
13861386 self
13871387 }
13881388
13891389 fn ty ( & mut self ) -> & mut Self {
13901390 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 ( ) ) ;
13921392 self
13931393 }
13941394
@@ -1780,7 +1780,7 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
17801780
17811781 let module = tcx. hir_module_items ( module_def_id) ;
17821782 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) ;
17841784
17851785 if let Some ( body_id) = tcx. hir_maybe_body_owned_by ( def_id) {
17861786 visitor. visit_nested_body ( body_id. id ( ) ) ;
@@ -1793,7 +1793,11 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
17931793 let trait_ref = tcx. impl_trait_ref ( id. owner_id . def_id ) . unwrap ( ) ;
17941794 let trait_ref = trait_ref. instantiate_identity ( ) ;
17951795 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+ ) ;
17971801 }
17981802 }
17991803 }
0 commit comments