Skip to content

Commit 7383425

Browse files
committed
Add more test cases.
1 parent 8e40f4b commit 7383425

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
// Test for #120759, which causes a deadlock bug
2+
//
3+
//@ compile-flags: -Z threads=50
4+
5+
#![crate_type= "lib"]
6+
#![feature(transmutability)]
7+
8+
mod assert {
9+
use std::mem::{Assume, BikeshedIntrinsicFrom};
10+
pub struct Context;
11+
12+
pub fn is_maybe_transmutable<Src, Dst>(&self, cpu: &mut CPU)
13+
where
14+
Dst: BikeshedIntrinsicFrom<Src, Context>,
15+
{
16+
}
17+
}
18+
19+
fn should_pad_explicitly_packed_field() {
20+
#[repr(C)]
21+
struct ExplicitlyPadded(ExplicitlyPadded);
22+
23+
assert::is_maybe_transmutable::<ExplicitlyPadded, ()>();
24+
}

0 commit comments

Comments
 (0)