]> git.lizzy.rs Git - rust.git/blob - src/tools/miri/tests/pass/sendable-class.rs
Rollup merge of #105784 - yanns:update_stdarch, r=Amanieu
[rust.git] / src / tools / miri / tests / pass / sendable-class.rs
1 // Test that a class with only sendable fields can be sent
2
3 use std::sync::mpsc::channel;
4
5 #[allow(dead_code)]
6 struct Foo {
7     i: isize,
8     j: char,
9 }
10
11 fn foo(i: isize, j: char) -> Foo {
12     Foo { i: i, j: j }
13 }
14
15 pub fn main() {
16     let (tx, rx) = channel();
17     tx.send(foo(42, 'c')).unwrap();
18     let _val = rx;
19 }