2024-02-16 14:02:50 -06:00
|
|
|
//@ compile-flags: -Z threads=16
|
|
|
|
//@ run-pass
|
2024-02-07 01:26:57 -06:00
|
|
|
|
|
|
|
#[repr(transparent)]
|
|
|
|
struct Sched {
|
|
|
|
i: i32,
|
|
|
|
}
|
|
|
|
impl Sched {
|
|
|
|
extern "C" fn get(self) -> i32 { self.i }
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let s = Sched { i: 4 };
|
|
|
|
let f = || -> i32 {
|
|
|
|
s.get()
|
|
|
|
};
|
|
|
|
println!("f: {}", f());
|
|
|
|
}
|