]> git.proxmox.com Git - rustc.git/blame - 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
CommitLineData
b7449926 1// run-pass
0bf4aa26
XL
2#![allow(unused_must_use)]
3#![allow(dead_code)]
4#![allow(unused_variables)]
b7449926
XL
5#![allow(non_camel_case_types)]
6
223e47cc
LB
7// Test that a class with only sendable fields can be sent
8
c34b1796
AL
9// pretty-expanded FIXME #23616
10
1a4d82fc 11use std::sync::mpsc::channel;
970d7e83 12
223e47cc 13struct foo {
c34b1796 14 i: isize,
223e47cc
LB
15 j: char,
16}
17
c34b1796 18fn foo(i:isize, j: char) -> foo {
223e47cc
LB
19 foo {
20 i: i,
21 j: j
22 }
23}
24
25pub fn main() {
1a4d82fc
JJ
26 let (tx, rx) = channel();
27 tx.send(foo(42, 'c'));
223e47cc 28}