diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-02-19 17:22:03 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2023-02-19 17:22:03 +0000 |
| commit | 9e6dfba38392febcd2be1322a4f90455c1187067 (patch) | |
| tree | b64ed1e21ee3493b932cdf10c95e387d291916d5 | |
| parent | b08762493c43ac7b4d4c9c22d7565b35535cb8d7 (diff) | |
| download | rust-9e6dfba38392febcd2be1322a4f90455c1187067.tar.gz rust-9e6dfba38392febcd2be1322a4f90455c1187067.zip | |
Allow codegen to unsize dyn* to dyn
cg_clif counterpart to rust-lang/rust#106532
| -rwxr-xr-x | scripts/test_rustc_tests.sh | 1 | ||||
| -rw-r--r-- | src/unsize.rs | 4 |
2 files changed, 1 insertions, 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() { |
