]> git.proxmox.com Git - rustc.git/blob - src/test/ui/threads-sendsync/sendable-class.rs
New upstream version 1.67.1+dfsg1
[rustc.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 }