diff options
| author | Michael Goulet <michael@errs.io> | 2022-08-29 03:53:33 +0000 |
|---|---|---|
| committer | Eric Holk <ericholk@microsoft.com> | 2022-09-12 16:55:59 -0700 |
| commit | b2ed2dcaaedf0a96dece85a5409b3a1f30a84360 (patch) | |
| tree | 09e5929727f25e3cec44443f4f9fdf857cddc0f3 /compiler/rustc_codegen_ssa/src/mir | |
| parent | 12ec2f0e34e230a5d95d7ef06c6de92efcdcbedf (diff) | |
| download | rust-b2ed2dcaaedf0a96dece85a5409b3a1f30a84360.tar.gz rust-b2ed2dcaaedf0a96dece85a5409b3a1f30a84360.zip | |
Rename some variants
Diffstat (limited to 'compiler/rustc_codegen_ssa/src/mir')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/block.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/mir/rvalue.rs | 2 |
2 files changed, 4 insertions, 4 deletions
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<T> ( *mut T, Vtable<T: Trait> ) @@ -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: sizeof(T) == sizeof(usize)> (T, Vtable<T: Trait>) 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") |
