@@ -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) ;
@@ -912,7 +912,7 @@ fn typeck_tables_of<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::TypeckT
912912 tables
913913}
914914
915- fn check_abi < ' tcx > ( tcx : TyCtxt < ' tcx > , span : Span , abi : Abi ) {
915+ fn check_abi ( tcx : TyCtxt < ' _ > , span : Span , abi : Abi ) {
916916 if !tcx. sess . target . target . is_abi_supported ( abi) {
917917 struct_span_err ! ( tcx. sess, span, E0570 ,
918918 "The ABI `{}` is not supported for the current target" , abi) . emit ( )
@@ -1285,7 +1285,7 @@ fn check_fn<'a, 'tcx>(
12851285 ( fcx, gen_ty)
12861286}
12871287
1288- fn check_struct < ' tcx > ( tcx : TyCtxt < ' tcx > , id : hir:: HirId , span : Span ) {
1288+ fn check_struct ( tcx : TyCtxt < ' _ > , id : hir:: HirId , span : Span ) {
12891289 let def_id = tcx. hir ( ) . local_def_id_from_hir_id ( id) ;
12901290 let def = tcx. adt_def ( def_id) ;
12911291 def. destructor ( tcx) ; // force the destructor to be evaluated
@@ -1299,7 +1299,7 @@ fn check_struct<'tcx>(tcx: TyCtxt<'tcx>, id: hir::HirId, span: Span) {
12991299 check_packed ( tcx, span, def_id) ;
13001300}
13011301
1302- fn check_union < ' tcx > ( tcx : TyCtxt < ' tcx > , id : hir:: HirId , span : Span ) {
1302+ fn check_union ( tcx : TyCtxt < ' _ > , id : hir:: HirId , span : Span ) {
13031303 let def_id = tcx. hir ( ) . local_def_id_from_hir_id ( id) ;
13041304 let def = tcx. adt_def ( def_id) ;
13051305 def. destructor ( tcx) ; // force the destructor to be evaluated
@@ -1461,14 +1461,14 @@ fn maybe_check_static_with_link_section(tcx: TyCtxt<'_>, id: DefId, span: Span)
14611461 }
14621462}
14631463
1464- fn check_on_unimplemented < ' tcx > ( tcx : TyCtxt < ' tcx > , trait_def_id : DefId , item : & hir:: Item ) {
1464+ fn check_on_unimplemented ( tcx : TyCtxt < ' _ > , trait_def_id : DefId , item : & hir:: Item ) {
14651465 let item_def_id = tcx. hir ( ) . local_def_id_from_hir_id ( item. hir_id ) ;
14661466 // an error would be reported if this fails.
14671467 let _ = traits:: OnUnimplementedDirective :: of_item ( tcx, trait_def_id, item_def_id) ;
14681468}
14691469
1470- fn report_forbidden_specialization < ' tcx > (
1471- tcx : TyCtxt < ' tcx > ,
1470+ fn report_forbidden_specialization (
1471+ tcx : TyCtxt < ' _ > ,
14721472 impl_item : & hir:: ImplItem ,
14731473 parent_impl : DefId ,
14741474) {
@@ -1684,7 +1684,7 @@ fn check_impl_items_against_trait<'tcx>(
16841684/// Checks whether a type can be represented in memory. In particular, it
16851685/// identifies types that contain themselves without indirection through a
16861686/// pointer, which would mean their size is unbounded.
1687- fn check_representable < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , item_def_id : DefId ) -> bool {
1687+ fn check_representable ( tcx : TyCtxt < ' _ > , sp : Span , item_def_id : DefId ) -> bool {
16881688 let rty = tcx. type_of ( item_def_id) ;
16891689
16901690 // Check that it is possible to represent this type. This call identifies
@@ -1706,7 +1706,7 @@ fn check_representable<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, item_def_id: DefId) ->
17061706 return true ;
17071707}
17081708
1709- pub fn check_simd < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1709+ pub fn check_simd ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
17101710 let t = tcx. type_of ( def_id) ;
17111711 if let ty:: Adt ( def, substs) = t. sty {
17121712 if def. is_struct ( ) {
@@ -1735,7 +1735,7 @@ pub fn check_simd<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) {
17351735 }
17361736}
17371737
1738- fn check_packed < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1738+ fn check_packed ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
17391739 let repr = tcx. adt_def ( def_id) . repr ;
17401740 if repr. packed ( ) {
17411741 for attr in tcx. get_attrs ( def_id) . iter ( ) {
@@ -1759,7 +1759,7 @@ fn check_packed<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) {
17591759 }
17601760}
17611761
1762- fn check_packed_inner < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId , stack : & mut Vec < DefId > ) -> bool {
1762+ fn check_packed_inner ( tcx : TyCtxt < ' _ > , def_id : DefId , stack : & mut Vec < DefId > ) -> bool {
17631763 let t = tcx. type_of ( def_id) ;
17641764 if stack. contains ( & def_id) {
17651765 debug ! ( "check_packed_inner: {:?} is recursive" , t) ;
@@ -1833,7 +1833,7 @@ fn bad_non_zero_sized_fields<'tcx>(
18331833 err. emit ( ) ;
18341834}
18351835
1836- fn check_transparent < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1836+ fn check_transparent ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
18371837 let adt = tcx. adt_def ( def_id) ;
18381838 if !adt. repr . transparent ( ) {
18391839 return ;
@@ -1982,7 +1982,7 @@ pub fn check_enum<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, vs: &'tcx [hir::Variant], i
19821982 check_transparent ( tcx, sp, def_id) ;
19831983}
19841984
1985- fn report_unexpected_variant_res < ' tcx > ( tcx : TyCtxt < ' tcx > , res : Res , span : Span , qpath : & QPath ) {
1985+ fn report_unexpected_variant_res ( tcx : TyCtxt < ' _ > , res : Res , span : Span , qpath : & QPath ) {
19861986 span_err ! ( tcx. sess, span, E0533 ,
19871987 "expected unit struct/variant or constant, found {} `{}`" ,
19881988 res. descr( ) ,
0 commit comments