X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_typeck%2Fsrc%2Fmem_categorization.rs;h=1bbd6d29294a60e62fe6e067177d036f3da50c45;hb=cb4ee81ef555126e49b3e9f16ca6f12a3264a451;hp=2c2d2be8bb5141e9eac2f9c9073b64164243074b;hpb=54f357836ec5786fa7f6f08626ee5b692ccb2757;p=rust.git diff --git a/compiler/rustc_typeck/src/mem_categorization.rs b/compiler/rustc_typeck/src/mem_categorization.rs index 2c2d2be8bb5..1bbd6d29294 100644 --- a/compiler/rustc_typeck/src/mem_categorization.rs +++ b/compiler/rustc_typeck/src/mem_categorization.rs @@ -192,7 +192,7 @@ fn expr_ty(&self, expr: &hir::Expr<'_>) -> McResult> { if let Some(vec) = self.typeck_results.pat_adjustments().get(pat.hir_id) { if let Some(first_ty) = vec.first() { debug!("pat_ty(pat={:?}) found adjusted ty `{:?}`", pat, first_ty); - return Ok(first_ty); + return Ok(*first_ty); } } @@ -562,7 +562,7 @@ fn variant_index_for_adt( Res::Def(DefKind::Ctor(CtorOf::Struct, ..), _) | Res::Def(DefKind::Struct | DefKind::Union | DefKind::TyAlias | DefKind::AssocTy, _) | Res::SelfCtor(..) - | Res::SelfTy(..) => { + | Res::SelfTy { .. } => { // Structs and Unions have only have one variant. Ok(VariantIdx::new(0)) }