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