]> git.lizzy.rs Git - rust.git/blobdiff - compiler/rustc_hir_analysis/src/mem_categorization.rs
Auto merge of #103185 - chenyukang:yukang/fix-span-next-point, r=davidtwco
[rust.git] / compiler / rustc_hir_analysis / src / mem_categorization.rs
index a6880c7e77ac3ebc645cd844865e4cdf19de6f0d..362f1c3430041a45e668c263b825e7f790a2fbc9 100644 (file)
@@ -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
@@ -292,7 +292,8 @@ fn cat_expr_adjusted_with<F>(
 
             adjustment::Adjust::NeverToAny
             | adjustment::Adjust::Pointer(_)
-            | adjustment::Adjust::Borrow(_) => {
+            | adjustment::Adjust::Borrow(_)
+            | adjustment::Adjust::DynStar => {
                 // Result is an rvalue.
                 Ok(self.cat_rvalue(expr.hir_id, expr.span, target))
             }