diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2022-06-15 06:14:48 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2022-06-15 11:47:04 -0400 |
| commit | e260afc3ba1eeeb3bd006fb72474365698b88c47 (patch) | |
| tree | 464c7a87416a059238089a34e8d10ddd7361b4df | |
| parent | c5ed318b22c4e6f8f894a83c3abe19070c806b66 (diff) | |
| download | rust-e260afc3ba1eeeb3bd006fb72474365698b88c47.tar.gz rust-e260afc3ba1eeeb3bd006fb72474365698b88c47.zip | |
simplify argument type for to take param-ty
we don't really take other things
| -rw-r--r-- | compiler/rustc_infer/src/infer/outlives/verify.rs | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/compiler/rustc_infer/src/infer/outlives/verify.rs b/compiler/rustc_infer/src/infer/outlives/verify.rs index 17681338a63..bc6fb5ebf7c 100644 --- a/compiler/rustc_infer/src/infer/outlives/verify.rs +++ b/compiler/rustc_infer/src/infer/outlives/verify.rs @@ -83,10 +83,8 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> { // Start with anything like `T: 'a` we can scrape from the // environment - let param_bounds = self - .declared_generic_bounds_from_env(GenericKind::Param(param_ty)) - .into_iter() - .map(|outlives| outlives.1); + let param_bounds = + self.declared_generic_bounds_from_env(param_ty).into_iter().map(|outlives| outlives.1); // Add in the default bound of fn body that applies to all in // scope type parameters: @@ -218,9 +216,9 @@ impl<'cx, 'tcx> VerifyBoundCx<'cx, 'tcx> { /// bounds, but all the bounds it returns can be relied upon. fn declared_generic_bounds_from_env( &self, - generic: GenericKind<'tcx>, + param_ty: ty::ParamTy, ) -> Vec<ty::OutlivesPredicate<Ty<'tcx>, ty::Region<'tcx>>> { - let generic_ty = generic.to_ty(self.tcx); + let generic_ty = param_ty.to_ty(self.tcx); self.declared_generic_bounds_from_env_with_compare_fn(|ty| ty == generic_ty) } |
