From 9e6dfba38392febcd2be1322a4f90455c1187067 Mon Sep 17 00:00:00 2001 From: bjorn3 <17426603+bjorn3@users.noreply.github.com> Date: Sun, 19 Feb 2023 17:22:03 +0000 Subject: [PATCH] Allow codegen to unsize dyn* to dyn cg_clif counterpart to rust-lang/rust#106532 --- scripts/test_rustc_tests.sh | 1 - src/unsize.rs | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/scripts/test_rustc_tests.sh b/scripts/test_rustc_tests.sh index e14a129dbc2..c44b34d96bd 100755 --- a/scripts/test_rustc_tests.sh +++ b/scripts/test_rustc_tests.sh @@ -113,7 +113,6 @@ rm tests/ui/simd/intrinsic/generic-reduction-pass.rs # simd_reduce_add_unordered rm tests/ui/simd/intrinsic/generic-as.rs # crash when accessing vector type filed (#1318) rm tests/ui/simd/simd-bitmask.rs # crash -rm tests/ui/dyn-star/dyn-star-to-dyn.rs rm tests/ui/dyn-star/dispatch-on-pin-mut.rs # bugs in the test suite diff --git a/src/unsize.rs b/src/unsize.rs index e400d476db5..ecf187a0b0f 100644 --- a/src/unsize.rs +++ b/src/unsize.rs @@ -28,9 +28,7 @@ pub(crate) fn unsized_info<'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() {