]> git.lizzy.rs Git - rust.git/blob - src/test/ui/threads-sendsync/sendable-class.rs
Merge commit 'e18101137866b79045fee0ef996e696e68c920b4' into clippyup
[rust.git] / src / test / ui / threads-sendsync / sendable-class.rs
1 // run-pass
2 #![allow(unused_must_use)]
3 #![allow(dead_code)]
4 #![allow(unused_variables)]
5 #![allow(non_camel_case_types)]
6
7 // Test that a class with only sendable fields can be sent
8
9 // pretty-expanded FIXME #23616
10
11 use std::sync::mpsc::channel;
12
13 struct foo {
14   i: isize,
15   j: char,
16 }
17
18 fn foo(i:isize, j: char) -> foo {
19     foo {
20         i: i,
21         j: j
22     }
23 }
24
25 pub fn main() {
26     let (tx, rx) = channel();
27     tx.send(foo(42, 'c'));
28 }