@@ -698,31 +698,31 @@ impl ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> {
698698 fn visit_impl_item ( & mut self , _: & ' tcx hir:: ImplItem ) { }
699699}
700700
701- pub fn check_wf_new < ' tcx > ( tcx : TyCtxt < ' tcx > ) {
701+ pub fn check_wf_new ( tcx : TyCtxt < ' _ > ) {
702702 let mut visit = wfcheck:: CheckTypeWellFormedVisitor :: new ( tcx) ;
703703 tcx. hir ( ) . krate ( ) . par_visit_all_item_likes ( & mut visit) ;
704704}
705705
706- fn check_mod_item_types < ' tcx > ( tcx : TyCtxt < ' tcx > , module_def_id : DefId ) {
706+ fn check_mod_item_types ( tcx : TyCtxt < ' _ > , module_def_id : DefId ) {
707707 tcx. hir ( ) . visit_item_likes_in_module ( module_def_id, & mut CheckItemTypesVisitor { tcx } ) ;
708708}
709709
710- fn typeck_item_bodies < ' tcx > ( tcx : TyCtxt < ' tcx > , crate_num : CrateNum ) {
710+ fn typeck_item_bodies ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) {
711711 debug_assert ! ( crate_num == LOCAL_CRATE ) ;
712712 tcx. par_body_owners ( |body_owner_def_id| {
713713 tcx. ensure ( ) . typeck_tables_of ( body_owner_def_id) ;
714714 } ) ;
715715}
716716
717- fn check_item_well_formed < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) {
717+ fn check_item_well_formed ( tcx : TyCtxt < ' _ > , def_id : DefId ) {
718718 wfcheck:: check_item_well_formed ( tcx, def_id) ;
719719}
720720
721- fn check_trait_item_well_formed < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) {
721+ fn check_trait_item_well_formed ( tcx : TyCtxt < ' _ > , def_id : DefId ) {
722722 wfcheck:: check_trait_item ( tcx, def_id) ;
723723}
724724
725- fn check_impl_item_well_formed < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) {
725+ fn check_impl_item_well_formed ( tcx : TyCtxt < ' _ > , def_id : DefId ) {
726726 wfcheck:: check_impl_item ( tcx, def_id) ;
727727}
728728
@@ -742,7 +742,7 @@ pub fn provide(providers: &mut Providers<'_>) {
742742 } ;
743743}
744744
745- fn adt_destructor < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> Option < ty:: Destructor > {
745+ fn adt_destructor ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> Option < ty:: Destructor > {
746746 tcx. calculate_dtor ( def_id, & mut dropck:: check_drop_impl)
747747}
748748
@@ -755,10 +755,10 @@ fn adt_destructor<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option<ty::Destruct
755755/// may not succeed. In some cases where this function returns `None`
756756/// (notably closures), `typeck_tables(def_id)` would wind up
757757/// redirecting to the owning function.
758- fn primary_body_of < ' tcx > (
759- tcx : TyCtxt < ' tcx > ,
758+ fn primary_body_of (
759+ tcx : TyCtxt < ' _ > ,
760760 id : hir:: HirId ,
761- ) -> Option < ( hir:: BodyId , Option < & ' tcx hir:: FnDecl > ) > {
761+ ) -> Option < ( hir:: BodyId , Option < & hir:: FnDecl > ) > {
762762 match tcx. hir ( ) . get ( id) {
763763 Node :: Item ( item) => {
764764 match item. node {
@@ -796,7 +796,7 @@ fn primary_body_of<'tcx>(
796796 }
797797}
798798
799- fn has_typeck_tables < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> bool {
799+ fn has_typeck_tables ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
800800 // Closures' tables come from their outermost function,
801801 // as they are part of the same "inference environment".
802802 let outer_def_id = tcx. closure_base_def_id ( def_id) ;
@@ -808,11 +808,11 @@ fn has_typeck_tables<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> bool {
808808 primary_body_of ( tcx, id) . is_some ( )
809809}
810810
811- fn used_trait_imports < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> & ' tcx DefIdSet {
811+ fn used_trait_imports ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> & DefIdSet {
812812 & * tcx. typeck_tables_of ( def_id) . used_trait_imports
813813}
814814
815- fn typeck_tables_of < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> & ' tcx ty:: TypeckTables < ' tcx > {
815+ fn typeck_tables_of ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> & ty:: TypeckTables < ' _ > {
816816 // Closures' tables come from their outermost function,
817817 // as they are part of the same "inference environment".
818818 let outer_def_id = tcx. closure_base_def_id ( def_id) ;
@@ -913,7 +913,7 @@ fn typeck_tables_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::TypeckT
913913 tables
914914}
915915
916- fn check_abi < ' tcx > ( tcx : TyCtxt < ' tcx > , span : Span , abi : Abi ) {
916+ fn check_abi ( tcx : TyCtxt < ' _ > , span : Span , abi : Abi ) {
917917 if !tcx. sess . target . target . is_abi_supported ( abi) {
918918 struct_span_err ! ( tcx. sess, span, E0570 ,
919919 "The ABI `{}` is not supported for the current target" , abi) . emit ( )
@@ -1291,7 +1291,7 @@ fn check_fn<'a, 'tcx>(
12911291 ( fcx, gen_ty)
12921292}
12931293
1294- fn check_struct < ' tcx > ( tcx : TyCtxt < ' tcx > , id : hir:: HirId , span : Span ) {
1294+ fn check_struct ( tcx : TyCtxt < ' _ > , id : hir:: HirId , span : Span ) {
12951295 let def_id = tcx. hir ( ) . local_def_id_from_hir_id ( id) ;
12961296 let def = tcx. adt_def ( def_id) ;
12971297 def. destructor ( tcx) ; // force the destructor to be evaluated
@@ -1305,7 +1305,7 @@ fn check_struct<'tcx>(tcx: TyCtxt<'tcx>, id: hir::HirId, span: Span) {
13051305 check_packed ( tcx, span, def_id) ;
13061306}
13071307
1308- fn check_union < ' tcx > ( tcx : TyCtxt < ' tcx > , id : hir:: HirId , span : Span ) {
1308+ fn check_union ( tcx : TyCtxt < ' _ > , id : hir:: HirId , span : Span ) {
13091309 let def_id = tcx. hir ( ) . local_def_id_from_hir_id ( id) ;
13101310 let def = tcx. adt_def ( def_id) ;
13111311 def. destructor ( tcx) ; // force the destructor to be evaluated
@@ -1467,14 +1467,14 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: DefId, span: Span)
14671467 }
14681468}
14691469
1470- fn check_on_unimplemented < ' tcx > ( tcx : TyCtxt < ' tcx > , trait_def_id : DefId , item : & hir:: Item ) {
1470+ fn check_on_unimplemented ( tcx : TyCtxt < ' _ > , trait_def_id : DefId , item : & hir:: Item ) {
14711471 let item_def_id = tcx. hir ( ) . local_def_id_from_hir_id ( item. hir_id ) ;
14721472 // an error would be reported if this fails.
14731473 let _ = traits:: OnUnimplementedDirective :: of_item ( tcx, trait_def_id, item_def_id) ;
14741474}
14751475
1476- fn report_forbidden_specialization < ' tcx > (
1477- tcx : TyCtxt < ' tcx > ,
1476+ fn report_forbidden_specialization (
1477+ tcx : TyCtxt < ' _ > ,
14781478 impl_item : & hir:: ImplItem ,
14791479 parent_impl : DefId ,
14801480) {
@@ -1690,7 +1690,7 @@ fn check_impl_items_against_trait<'tcx>(
16901690/// Checks whether a type can be represented in memory. In particular, it
16911691/// identifies types that contain themselves without indirection through a
16921692/// pointer, which would mean their size is unbounded.
1693- fn check_representable < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , item_def_id : DefId ) -> bool {
1693+ fn check_representable ( tcx : TyCtxt < ' _ > , sp : Span , item_def_id : DefId ) -> bool {
16941694 let rty = tcx. type_of ( item_def_id) ;
16951695
16961696 // Check that it is possible to represent this type. This call identifies
@@ -1712,7 +1712,7 @@ fn check_representable<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, item_def_id: DefId) ->
17121712 return true ;
17131713}
17141714
1715- pub fn check_simd < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1715+ pub fn check_simd ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
17161716 let t = tcx. type_of ( def_id) ;
17171717 if let ty:: Adt ( def, substs) = t. sty {
17181718 if def. is_struct ( ) {
@@ -1741,7 +1741,7 @@ pub fn check_simd<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) {
17411741 }
17421742}
17431743
1744- fn check_packed < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1744+ fn check_packed ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
17451745 let repr = tcx. adt_def ( def_id) . repr ;
17461746 if repr. packed ( ) {
17471747 for attr in tcx. get_attrs ( def_id) . iter ( ) {
@@ -1765,7 +1765,7 @@ fn check_packed<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) {
17651765 }
17661766}
17671767
1768- fn check_packed_inner < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId , stack : & mut Vec < DefId > ) -> bool {
1768+ fn check_packed_inner ( tcx : TyCtxt < ' _ > , def_id : DefId , stack : & mut Vec < DefId > ) -> bool {
17691769 let t = tcx. type_of ( def_id) ;
17701770 if stack. contains ( & def_id) {
17711771 debug ! ( "check_packed_inner: {:?} is recursive" , t) ;
@@ -1839,7 +1839,7 @@ fn bad_non_zero_sized_fields<'tcx>(
18391839 err. emit ( ) ;
18401840}
18411841
1842- fn check_transparent < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1842+ fn check_transparent ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
18431843 let adt = tcx. adt_def ( def_id) ;
18441844 if !adt. repr . transparent ( ) {
18451845 return ;
@@ -1988,7 +1988,7 @@ pub fn check_enum<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, vs: &'tcx [hir::Variant], i
19881988 check_transparent ( tcx, sp, def_id) ;
19891989}
19901990
1991- fn report_unexpected_variant_res < ' tcx > ( tcx : TyCtxt < ' tcx > , res : Res , span : Span , qpath : & QPath ) {
1991+ fn report_unexpected_variant_res ( tcx : TyCtxt < ' _ > , res : Res , span : Span , qpath : & QPath ) {
19921992 span_err ! ( tcx. sess, span, E0533 ,
19931993 "expected unit struct/variant or constant, found {} `{}`" ,
19941994 res. descr( ) ,
0 commit comments