summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2023-01-06 08:47:35 +0000
committerMichael Goulet <michael@errs.io>2023-01-11 19:52:42 +0000
commit70a8d8dcf3c07c3a43c3ee0561dfe5ce594ae365 (patch)
treee195fb252d7978a497d15a979fd69f8513cb5de5 /compiler/rustc_codegen_ssa/src
parentb22c152958eade17a71d899b29a2d39bcc77aa48 (diff)
downloadrust-70a8d8dcf3c07c3a43c3ee0561dfe5ce594ae365.tar.gz
rust-70a8d8dcf3c07c3a43c3ee0561dfe5ce594ae365.zip
Allow codegen to unsize dyn* to dyn
Diffstat (limited to 'compiler/rustc_codegen_ssa/src')
-rw-r--r--compiler/rustc_codegen_ssa/src/base.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/base.rs b/compiler/rustc_codegen_ssa/src/base.rs
index d318c15d342..f7312f6fcda 100644
--- a/compiler/rustc_codegen_ssa/src/base.rs
+++ b/compiler/rustc_codegen_ssa/src/base.rs
@@ -153,9 +153,7 @@ pub fn unsized_info<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>>(
         (
             &ty::Dynamic(ref data_a, _, src_dyn_kind),
             &ty::Dynamic(ref data_b, _, target_dyn_kind),
-        ) => {
-            assert_eq!(src_dyn_kind, target_dyn_kind);
-
+        ) if src_dyn_kind == target_dyn_kind => {
             let old_info =
                 old_info.expect("unsized_info: missing old info for trait upcasting coercion");
             if data_a.principal_def_id() == data_b.principal_def_id() {