Skip to content

Commit 6f2c051

Browse files
committed
add some DispatchFromDyn ABI compatibility tests
1 parent 4f606eb commit 6f2c051

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/ui/abi/compatibility.rs

+5
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,11 @@ test_abi_compatible!(zst_unit, Zst, ());
8585
test_abi_compatible!(zst_array, Zst, [u8; 0]);
8686
test_abi_compatible!(nonzero_int, NonZeroI32, i32);
8787

88+
// `DispatchFromDyn` relies on ABI compatibility.
89+
// This is interesting since these types are not `repr(transparent)`.
90+
test_abi_compatible!(rc, std::rc::Rc<i32>, *mut i32);
91+
test_abi_compatible!(arc, std::sync::Arc<i32>, *mut i32);
92+
8893
// `repr(transparent)` compatibility.
8994
#[repr(transparent)]
9095
struct Wrapper1<T: ?Sized>(T);

0 commit comments

Comments
 (0)