2019-07-27 00:54:25 +03:00
|
|
|
//@ run-pass
|
|
|
|
|
2018-09-14 12:20:28 +02:00
|
|
|
#![allow(non_camel_case_types)]
|
|
|
|
#![allow(dead_code)]
|
2015-03-22 13:13:15 -07:00
|
|
|
//@ pretty-expanded FIXME #23616
|
|
|
|
|
2013-08-17 08:37:42 -07:00
|
|
|
fn p_foo<T>(_pinned: T) { }
|
|
|
|
fn s_foo<T>(_shared: T) { }
|
|
|
|
fn u_foo<T:Send>(_unique: T) { }
|
2011-07-28 17:22:59 +00:00
|
|
|
|
2012-08-15 18:46:55 -07:00
|
|
|
struct r {
|
2015-03-25 17:06:52 -07:00
|
|
|
i: isize,
|
2012-11-14 01:22:37 -05:00
|
|
|
}
|
|
|
|
|
2013-02-14 11:47:00 -08:00
|
|
|
impl Drop for r {
|
2013-09-16 21:18:07 -04:00
|
|
|
fn drop(&mut self) {}
|
2012-06-01 14:48:02 -07:00
|
|
|
}
|
2011-07-28 17:22:59 +00:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn r(i:isize) -> r {
|
2012-09-05 15:58:43 -07:00
|
|
|
r {
|
|
|
|
i: i
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2011-11-18 16:15:46 +01:00
|
|
|
p_foo(r(10));
|
|
|
|
|
2021-08-25 02:39:40 +02:00
|
|
|
p_foo::<Box<_>>(Box::new(r(10)));
|
|
|
|
p_foo::<Box<_>>(Box::new(10));
|
2015-01-25 22:05:03 +01:00
|
|
|
p_foo(10);
|
2011-07-28 17:22:59 +00:00
|
|
|
|
2021-08-25 02:39:40 +02:00
|
|
|
s_foo::<Box<_>>(Box::new(10));
|
2015-01-25 22:05:03 +01:00
|
|
|
s_foo(10);
|
2011-07-28 17:22:59 +00:00
|
|
|
|
2021-08-25 02:39:40 +02:00
|
|
|
u_foo::<Box<_>>(Box::new(10));
|
2015-01-25 22:05:03 +01:00
|
|
|
u_foo(10);
|
2011-08-12 06:37:25 -07:00
|
|
|
}
|