]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_analysis/src/mem_categorization.rs
Rollup merge of #102092 - kxxt:patch-1, r=joshtriplett
[rust.git] / compiler / rustc_hir_analysis / src / mem_categorization.rs
index 46b496478367d079ab36af293ade719266731fe2..b62c5b5e077833229e3362075ef7619209fded8b 100644 (file)
@@ -92,7 +92,7 @@ fn span(&self) -> Span {
 #[derive(Clone)]
 pub(crate) struct MemCategorizationContext<'a, 'tcx> {
     pub(crate) typeck_results: &'a ty::TypeckResults<'tcx>,
-    infcx: &'a InferCtxt<'a, 'tcx>,
+    infcx: &'a InferCtxt<'tcx>,
     param_env: ty::ParamEnv<'tcx>,
     body_owner: LocalDefId,
     upvars: Option<&'tcx FxIndexMap<hir::HirId, hir::Upvar>>,
@@ -103,7 +103,7 @@ pub(crate) struct MemCategorizationContext<'a, 'tcx> {
 impl<'a, 'tcx> MemCategorizationContext<'a, 'tcx> {
     /// Creates a `MemCategorizationContext`.
     pub(crate) fn new(
-        infcx: &'a InferCtxt<'a, 'tcx>,
+        infcx: &'a InferCtxt<'tcx>,
         param_env: ty::ParamEnv<'tcx>,
         body_owner: LocalDefId,
         typeck_results: &'a ty::TypeckResults<'tcx>,
@@ -184,7 +184,7 @@ pub(crate) fn expr_ty_adjusted(&self, expr: &hir::Expr<'_>) -> McResult<Ty<'tcx>
     ///   modes #42640) may look like `Some(x)` but in fact have
     ///   implicit deref patterns attached (e.g., it is really
     ///   `&Some(x)`). In that case, we return the "outermost" type
-    ///   (e.g., `&Option<T>).
+    ///   (e.g., `&Option<T>`).
     pub(crate) fn pat_ty_adjusted(&self, pat: &hir::Pat<'_>) -> McResult<Ty<'tcx>> {
         // Check for implicit `&` types wrapping the pattern; note
         // that these are never attached to binding patterns, so