2013-09-17 22:13:47 +02:00
|
|
|
// pp-exact
|
|
|
|
|
2014-05-05 18:56:44 -07:00
|
|
|
|
2015-02-12 10:29:52 -05:00
|
|
|
trait Tr {
|
2021-12-01 11:45:14 -08:00
|
|
|
fn dummy(&self) {}
|
2015-02-12 10:29:52 -05:00
|
|
|
}
|
2021-12-01 11:45:14 -08:00
|
|
|
impl Tr for isize {}
|
2013-09-17 22:13:47 +02:00
|
|
|
|
2017-12-19 23:40:17 +03:00
|
|
|
fn foo<'a>(x: Box<Tr + Sync + 'a>) -> Box<Tr + Sync + 'a> { x }
|
2013-09-17 22:13:47 +02:00
|
|
|
|
|
|
|
fn main() {
|
2017-12-19 23:40:17 +03:00
|
|
|
let x: Box<Tr + Sync>;
|
2013-09-17 22:13:47 +02:00
|
|
|
|
2017-12-19 23:40:17 +03:00
|
|
|
Box::new(1isize) as Box<Tr + Sync>;
|
2013-09-17 22:13:47 +02:00
|
|
|
}
|