X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_hir_analysis%2Fsrc%2Fmem_categorization.rs;h=362f1c3430041a45e668c263b825e7f790a2fbc9;hb=e91fd0b514eaf950f8b84f0703142e8926d27286;hp=a6880c7e77ac3ebc645cd844865e4cdf19de6f0d;hpb=58d533dfc12f9ecd2bf1afa2837b6221a8ddbfdf;p=rust.git diff --git a/compiler/rustc_hir_analysis/src/mem_categorization.rs b/compiler/rustc_hir_analysis/src/mem_categorization.rs index a6880c7e77a..362f1c34300 100644 --- a/compiler/rustc_hir_analysis/src/mem_categorization.rs +++ b/compiler/rustc_hir_analysis/src/mem_categorization.rs @@ -184,7 +184,7 @@ pub(crate) fn expr_ty_adjusted(&self, expr: &hir::Expr<'_>) -> McResult /// 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). + /// (e.g., `&Option`). pub(crate) fn pat_ty_adjusted(&self, pat: &hir::Pat<'_>) -> McResult> { // 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( 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)) }