2018-08-30 14:18:55 +02:00
|
|
|
//@ run-pass
|
2018-09-25 23:51:35 +02:00
|
|
|
#![allow(unused_must_use)]
|
|
|
|
#![allow(dead_code)]
|
|
|
|
#![allow(unused_variables)]
|
2018-08-31 15:02:01 +02:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
|
2012-06-01 17:48:07 -07:00
|
|
|
// Test that a class with only sendable fields can be sent
|
|
|
|
|
2015-03-22 13:13:15 -07:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2014-12-23 11:53:35 -08:00
|
|
|
use std::sync::mpsc::channel;
|
2014-12-22 09:04:23 -08:00
|
|
|
|
2012-08-15 18:46:55 -07:00
|
|
|
struct foo {
|
2024-08-24 05:32:52 +02:00
|
|
|
i: isize,
|
|
|
|
j: char,
|
2012-09-05 15:58:43 -07:00
|
|
|
}
|
|
|
|
|
2024-08-24 05:32:52 +02:00
|
|
|
fn foo(i: isize, j: char) -> foo {
|
|
|
|
foo { i: i, j: j }
|
2012-06-01 17:48:07 -07:00
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2014-03-09 14:58:32 -07:00
|
|
|
let (tx, rx) = channel();
|
|
|
|
tx.send(foo(42, 'c'));
|
2013-02-14 11:47:00 -08:00
|
|
|
}
|