Skip to content

Commit e260afc

Browse files
committed
simplify argument type for to take param-ty
we don't really take other things
1 parent c5ed318 commit e260afc

File tree

1 file changed

+4
-6
lines changed
  • compiler/rustc_infer/src/infer/outlives

1 file changed

+4
-6
lines changed

compiler/rustc_infer/src/infer/outlives/verify.rs

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,8 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
8383

8484
// Start with anything like `T: 'a` we can scrape from the
8585
// environment
86-
let param_bounds = self
87-
.declared_generic_bounds_from_env(GenericKind::Param(param_ty))
88-
.into_iter()
89-
.map(|outlives| outlives.1);
86+
let param_bounds =
87+
self.declared_generic_bounds_from_env(param_ty).into_iter().map(|outlives| outlives.1);
9088

9189
// Add in the default bound of fn body that applies to all in
9290
// scope type parameters:
@@ -218,9 +216,9 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> {
218216
/// bounds, but all the bounds it returns can be relied upon.
219217
fn declared_generic_bounds_from_env(
220218
&self,
221-
generic: GenericKind<'tcx>,
219+
param_ty: ty::ParamTy,
222220
) -> Vec<ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>> {
223-
let generic_ty = generic.to_ty(self.tcx);
221+
let generic_ty = param_ty.to_ty(self.tcx);
224222
self.declared_generic_bounds_from_env_with_compare_fn(|ty| ty == generic_ty)
225223
}
226224

0 commit comments

Comments
 (0)