@@ -1361,12 +1361,12 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
13611361 GenericParamDefKind :: Lifetime => { }
13621362 GenericParamDefKind :: Type { has_default, .. } => {
13631363 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 ( ) ) ;
13651365 }
13661366 }
13671367 // FIXME(generic_const_exprs): May want to look inside const here
13681368 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 ( ) ) ;
13701370 }
13711371 }
13721372 }
@@ -1381,19 +1381,19 @@ impl SearchInterfaceForPrivateItemsVisitor<'_> {
13811381 // consider the ones that the user wrote. This is important
13821382 // for the inferred outlives rules; see
13831383 // `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 ) ) ;
13851385 self
13861386 }
13871387
13881388 fn bounds ( & mut self ) -> & mut Self {
13891389 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 ( ) ) ;
13911391 self
13921392 }
13931393
13941394 fn ty ( & mut self ) -> & mut Self {
13951395 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 ( ) ) ;
13971397 self
13981398 }
13991399
@@ -1785,7 +1785,7 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
17851785
17861786 let module = tcx. hir_module_items ( module_def_id) ;
17871787 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) ;
17891789
17901790 if let Some ( body_id) = tcx. hir_maybe_body_owned_by ( def_id) {
17911791 visitor. visit_nested_body ( body_id. id ( ) ) ;
@@ -1798,7 +1798,11 @@ fn check_mod_privacy(tcx: TyCtxt<'_>, module_def_id: LocalModDefId) {
17981798 let trait_ref = tcx. impl_trait_ref ( id. owner_id . def_id ) . unwrap ( ) ;
17991799 let trait_ref = trait_ref. instantiate_identity ( ) ;
18001800 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+ ) ;
18021806 }
18031807 }
18041808 }
0 commit comments