diff options
Diffstat (limited to 'compiler/rustc_ty_utils/src')
| -rw-r--r-- | compiler/rustc_ty_utils/src/consts.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/implied_bounds.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/layout.rs | 4 | ||||
| -rw-r--r-- | compiler/rustc_ty_utils/src/ty.rs | 5 |
4 files changed, 11 insertions, 14 deletions
diff --git a/compiler/rustc_ty_utils/src/consts.rs b/compiler/rustc_ty_utils/src/consts.rs index f8ff31f971b..a9b4e1420ea 100644 --- a/compiler/rustc_ty_utils/src/consts.rs +++ b/compiler/rustc_ty_utils/src/consts.rs @@ -267,8 +267,8 @@ struct IsThirPolymorphic<'a, 'tcx> { thir: &'a thir::Thir<'tcx>, } -fn error<'tcx>( - tcx: TyCtxt<'tcx>, +fn error( + tcx: TyCtxt<'_>, sub: GenericConstantTooComplexSub, root_span: Span, ) -> Result<!, ErrorGuaranteed> { @@ -281,8 +281,8 @@ fn error<'tcx>( Err(reported) } -fn maybe_supported_error<'tcx>( - tcx: TyCtxt<'tcx>, +fn maybe_supported_error( + tcx: TyCtxt<'_>, sub: GenericConstantTooComplexSub, root_span: Span, ) -> Result<!, ErrorGuaranteed> { @@ -349,10 +349,10 @@ impl<'a, 'tcx> visit::Visitor<'a, 'tcx> for IsThirPolymorphic<'a, 'tcx> { } /// Builds an abstract const, do not use this directly, but use `AbstractConst::new` instead. -pub fn thir_abstract_const<'tcx>( - tcx: TyCtxt<'tcx>, +pub fn thir_abstract_const( + tcx: TyCtxt<'_>, def: ty::WithOptConstParam<LocalDefId>, -) -> Result<Option<ty::Const<'tcx>>, ErrorGuaranteed> { +) -> Result<Option<ty::Const<'_>>, ErrorGuaranteed> { if tcx.features().generic_const_exprs { match tcx.def_kind(def.did) { // FIXME(generic_const_exprs): We currently only do this for anonymous constants, diff --git a/compiler/rustc_ty_utils/src/implied_bounds.rs b/compiler/rustc_ty_utils/src/implied_bounds.rs index f0d8c240ea5..b7a24a22c53 100644 --- a/compiler/rustc_ty_utils/src/implied_bounds.rs +++ b/compiler/rustc_ty_utils/src/implied_bounds.rs @@ -6,7 +6,7 @@ pub fn provide(providers: &mut ty::query::Providers) { *providers = ty::query::Providers { assumed_wf_types, ..*providers }; } -fn assumed_wf_types<'tcx>(tcx: TyCtxt<'tcx>, def_id: DefId) -> &'tcx ty::List<Ty<'tcx>> { +fn assumed_wf_types(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List<Ty<'_>> { match tcx.def_kind(def_id) { DefKind::Fn => { let sig = tcx.fn_sig(def_id); diff --git a/compiler/rustc_ty_utils/src/layout.rs b/compiler/rustc_ty_utils/src/layout.rs index c761a4dbe45..c8c6acaa453 100644 --- a/compiler/rustc_ty_utils/src/layout.rs +++ b/compiler/rustc_ty_utils/src/layout.rs @@ -489,8 +489,8 @@ enum SavedLocalEligibility { // of any variant. /// Compute the eligibility and assignment of each local. -fn generator_saved_local_eligibility<'tcx>( - info: &GeneratorLayout<'tcx>, +fn generator_saved_local_eligibility( + info: &GeneratorLayout<'_>, ) -> (BitSet<GeneratorSavedLocal>, IndexVec<GeneratorSavedLocal, SavedLocalEligibility>) { use SavedLocalEligibility::*; diff --git a/compiler/rustc_ty_utils/src/ty.rs b/compiler/rustc_ty_utils/src/ty.rs index 5279fc69a31..e2d10f550c3 100644 --- a/compiler/rustc_ty_utils/src/ty.rs +++ b/compiler/rustc_ty_utils/src/ty.rs @@ -225,10 +225,7 @@ fn param_env(tcx: TyCtxt<'_>, def_id: DefId) -> ty::ParamEnv<'_> { /// that are assumed to be well-formed (because they come from the environment). /// /// Used only in chalk mode. -fn well_formed_types_in_env<'tcx>( - tcx: TyCtxt<'tcx>, - def_id: DefId, -) -> &'tcx ty::List<Predicate<'tcx>> { +fn well_formed_types_in_env(tcx: TyCtxt<'_>, def_id: DefId) -> &ty::List<Predicate<'_>> { use rustc_hir::{ForeignItemKind, ImplItemKind, ItemKind, Node, TraitItemKind}; use rustc_middle::ty::subst::GenericArgKind; |
