@@ -698,31 +698,31 @@ impl ItemLikeVisitor<'tcx> for CheckItemTypesVisitor<'tcx> {
698
698
fn visit_impl_item ( & mut self , _: & ' tcx hir:: ImplItem ) { }
699
699
}
700
700
701
- pub fn check_wf_new < ' tcx > ( tcx : TyCtxt < ' tcx > ) {
701
+ pub fn check_wf_new ( tcx : TyCtxt < ' _ > ) {
702
702
let mut visit = wfcheck:: CheckTypeWellFormedVisitor :: new ( tcx) ;
703
703
tcx. hir ( ) . krate ( ) . par_visit_all_item_likes ( & mut visit) ;
704
704
}
705
705
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 ) {
707
707
tcx. hir ( ) . visit_item_likes_in_module ( module_def_id, & mut CheckItemTypesVisitor { tcx } ) ;
708
708
}
709
709
710
- fn typeck_item_bodies < ' tcx > ( tcx : TyCtxt < ' tcx > , crate_num : CrateNum ) {
710
+ fn typeck_item_bodies ( tcx : TyCtxt < ' _ > , crate_num : CrateNum ) {
711
711
debug_assert ! ( crate_num == LOCAL_CRATE ) ;
712
712
tcx. par_body_owners ( |body_owner_def_id| {
713
713
tcx. ensure ( ) . typeck_tables_of ( body_owner_def_id) ;
714
714
} ) ;
715
715
}
716
716
717
- fn check_item_well_formed < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) {
717
+ fn check_item_well_formed ( tcx : TyCtxt < ' _ > , def_id : DefId ) {
718
718
wfcheck:: check_item_well_formed ( tcx, def_id) ;
719
719
}
720
720
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 ) {
722
722
wfcheck:: check_trait_item ( tcx, def_id) ;
723
723
}
724
724
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 ) {
726
726
wfcheck:: check_impl_item ( tcx, def_id) ;
727
727
}
728
728
@@ -742,7 +742,7 @@ pub fn provide(providers: &mut Providers<'_>) {
742
742
} ;
743
743
}
744
744
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 > {
746
746
tcx. calculate_dtor ( def_id, & mut dropck:: check_drop_impl)
747
747
}
748
748
@@ -755,10 +755,10 @@ fn adt_destructor<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> Option<ty::Destruct
755
755
/// may not succeed. In some cases where this function returns `None`
756
756
/// (notably closures), `typeck_tables(def_id)` would wind up
757
757
/// redirecting to the owning function.
758
- fn primary_body_of < ' tcx > (
759
- tcx : TyCtxt < ' tcx > ,
758
+ fn primary_body_of (
759
+ tcx : TyCtxt < ' _ > ,
760
760
id : hir:: HirId ,
761
- ) -> Option < ( hir:: BodyId , Option < & ' tcx hir:: FnDecl > ) > {
761
+ ) -> Option < ( hir:: BodyId , Option < & hir:: FnDecl > ) > {
762
762
match tcx. hir ( ) . get ( id) {
763
763
Node :: Item ( item) => {
764
764
match item. node {
@@ -796,7 +796,7 @@ fn primary_body_of<'tcx>(
796
796
}
797
797
}
798
798
799
- fn has_typeck_tables < ' tcx > ( tcx : TyCtxt < ' tcx > , def_id : DefId ) -> bool {
799
+ fn has_typeck_tables ( tcx : TyCtxt < ' _ > , def_id : DefId ) -> bool {
800
800
// Closures' tables come from their outermost function,
801
801
// as they are part of the same "inference environment".
802
802
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 {
808
808
primary_body_of ( tcx, id) . is_some ( )
809
809
}
810
810
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 {
812
812
& * tcx. typeck_tables_of ( def_id) . used_trait_imports
813
813
}
814
814
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 < ' _ > {
816
816
// Closures' tables come from their outermost function,
817
817
// as they are part of the same "inference environment".
818
818
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
912
912
tables
913
913
}
914
914
915
- fn check_abi < ' tcx > ( tcx : TyCtxt < ' tcx > , span : Span , abi : Abi ) {
915
+ fn check_abi ( tcx : TyCtxt < ' _ > , span : Span , abi : Abi ) {
916
916
if !tcx. sess . target . target . is_abi_supported ( abi) {
917
917
struct_span_err ! ( tcx. sess, span, E0570 ,
918
918
"The ABI `{}` is not supported for the current target" , abi) . emit ( )
@@ -1285,7 +1285,7 @@ fn check_fn<'a, 'tcx>(
1285
1285
( fcx, gen_ty)
1286
1286
}
1287
1287
1288
- fn check_struct < ' tcx > ( tcx : TyCtxt < ' tcx > , id : hir:: HirId , span : Span ) {
1288
+ fn check_struct ( tcx : TyCtxt < ' _ > , id : hir:: HirId , span : Span ) {
1289
1289
let def_id = tcx. hir ( ) . local_def_id_from_hir_id ( id) ;
1290
1290
let def = tcx. adt_def ( def_id) ;
1291
1291
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) {
1299
1299
check_packed ( tcx, span, def_id) ;
1300
1300
}
1301
1301
1302
- fn check_union < ' tcx > ( tcx : TyCtxt < ' tcx > , id : hir:: HirId , span : Span ) {
1302
+ fn check_union ( tcx : TyCtxt < ' _ > , id : hir:: HirId , span : Span ) {
1303
1303
let def_id = tcx. hir ( ) . local_def_id_from_hir_id ( id) ;
1304
1304
let def = tcx. adt_def ( def_id) ;
1305
1305
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)
1461
1461
}
1462
1462
}
1463
1463
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 ) {
1465
1465
let item_def_id = tcx. hir ( ) . local_def_id_from_hir_id ( item. hir_id ) ;
1466
1466
// an error would be reported if this fails.
1467
1467
let _ = traits:: OnUnimplementedDirective :: of_item ( tcx, trait_def_id, item_def_id) ;
1468
1468
}
1469
1469
1470
- fn report_forbidden_specialization < ' tcx > (
1471
- tcx : TyCtxt < ' tcx > ,
1470
+ fn report_forbidden_specialization (
1471
+ tcx : TyCtxt < ' _ > ,
1472
1472
impl_item : & hir:: ImplItem ,
1473
1473
parent_impl : DefId ,
1474
1474
) {
@@ -1684,7 +1684,7 @@ fn check_impl_items_against_trait<'tcx>(
1684
1684
/// Checks whether a type can be represented in memory. In particular, it
1685
1685
/// identifies types that contain themselves without indirection through a
1686
1686
/// 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 {
1688
1688
let rty = tcx. type_of ( item_def_id) ;
1689
1689
1690
1690
// 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) ->
1706
1706
return true ;
1707
1707
}
1708
1708
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 ) {
1710
1710
let t = tcx. type_of ( def_id) ;
1711
1711
if let ty:: Adt ( def, substs) = t. sty {
1712
1712
if def. is_struct ( ) {
@@ -1735,7 +1735,7 @@ pub fn check_simd<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, def_id: DefId) {
1735
1735
}
1736
1736
}
1737
1737
1738
- fn check_packed < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1738
+ fn check_packed ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
1739
1739
let repr = tcx. adt_def ( def_id) . repr ;
1740
1740
if repr. packed ( ) {
1741
1741
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) {
1759
1759
}
1760
1760
}
1761
1761
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 {
1763
1763
let t = tcx. type_of ( def_id) ;
1764
1764
if stack. contains ( & def_id) {
1765
1765
debug ! ( "check_packed_inner: {:?} is recursive" , t) ;
@@ -1833,7 +1833,7 @@ fn bad_non_zero_sized_fields<'tcx>(
1833
1833
err. emit ( ) ;
1834
1834
}
1835
1835
1836
- fn check_transparent < ' tcx > ( tcx : TyCtxt < ' tcx > , sp : Span , def_id : DefId ) {
1836
+ fn check_transparent ( tcx : TyCtxt < ' _ > , sp : Span , def_id : DefId ) {
1837
1837
let adt = tcx. adt_def ( def_id) ;
1838
1838
if !adt. repr . transparent ( ) {
1839
1839
return ;
@@ -1982,7 +1982,7 @@ pub fn check_enum<'tcx>(tcx: TyCtxt<'tcx>, sp: Span, vs: &'tcx [hir::Variant], i
1982
1982
check_transparent ( tcx, sp, def_id) ;
1983
1983
}
1984
1984
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 ) {
1986
1986
span_err ! ( tcx. sess, span, E0533 ,
1987
1987
"expected unit struct/variant or constant, found {} `{}`" ,
1988
1988
res. descr( ) ,
0 commit comments