From b2ed2dcaaedf0a96dece85a5409b3a1f30a84360 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Mon, 29 Aug 2022 03:53:33 +0000 Subject: Rename some variants --- compiler/rustc_codegen_ssa/src/mir/block.rs | 6 +++--- compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/rustc_codegen_ssa/src') diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 0c7cd43eb27..59bae7f7e91 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -16,7 +16,7 @@ use rustc_index::vec::Idx; use rustc_middle::mir::{self, AssertKind, SwitchTargets}; use rustc_middle::ty::layout::{HasTyCtxt, LayoutOf}; use rustc_middle::ty::print::{with_no_trimmed_paths, with_no_visible_paths}; -use rustc_middle::ty::{self, Instance, TraitObjectRepresentation, Ty, TypeVisitable}; +use rustc_middle::ty::{self, Instance, Ty, TypeVisitable}; use rustc_span::source_map::Span; use rustc_span::{sym, Symbol}; use rustc_symbol_mangling::typeid::typeid_for_fnabi; @@ -398,7 +398,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { let (drop_fn, fn_abi) = match ty.kind() { // FIXME(eddyb) perhaps move some of this logic into // `Instance::resolve_drop_in_place`? - ty::Dynamic(_, _, TraitObjectRepresentation::Unsized) => { + ty::Dynamic(_, _, ty::Dyn) => { // IN THIS ARM, WE HAVE: // ty = *mut (dyn Trait) // which is: exists ( *mut T, Vtable ) @@ -428,7 +428,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { fn_abi, ) } - ty::Dynamic(_, _, TraitObjectRepresentation::Sized) => { + ty::Dynamic(_, _, ty::DynStar) => { // IN THIS ARM, WE HAVE: // ty = *mut (dyn* Trait) // which is: *mut exists (T, Vtable) diff --git a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs index d41817d7b65..56852b0fcc8 100644 --- a/compiler/rustc_codegen_ssa/src/mir/rvalue.rs +++ b/compiler/rustc_codegen_ssa/src/mir/rvalue.rs @@ -279,7 +279,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { OperandValue::Pair(_, _) => todo!(), }; let trait_ref = - if let ty::Dynamic(data, _, ty::TraitObjectRepresentation::Sized) = cast.ty.kind() { + if let ty::Dynamic(data, _, ty::DynStar) = cast.ty.kind() { data.principal() } else { bug!("Only valid to do a DynStar cast into a DynStar type") -- cgit 1.4.1-3-g733a5