2018-03-05 02:35:58 -06:00
|
|
|
#![feature(dyn_trait)]
|
2018-07-25 04:27:02 -05:00
|
|
|
|
2018-03-05 02:35:58 -06:00
|
|
|
fn main() {
|
2018-07-25 04:27:02 -05:00
|
|
|
// #2506
|
2018-03-05 02:35:58 -06:00
|
|
|
// checks rustfmt doesn't remove dyn
|
|
|
|
trait MyTrait {
|
|
|
|
fn method(&self) -> u64;
|
|
|
|
}
|
|
|
|
fn f1(a: Box<dyn MyTrait>) {}
|
|
|
|
|
|
|
|
// checks if line wrap works correctly
|
2018-03-09 23:29:01 -06:00
|
|
|
trait Very_______________________Long__________________Name_______________________________Trait {
|
2018-03-05 02:35:58 -06:00
|
|
|
fn method(&self) -> u64;
|
|
|
|
}
|
|
|
|
|
|
|
|
fn f2(a: Box<dyn Very_______________________Long__________________Name____________________Trait+ 'static,>) {}
|
|
|
|
|
2018-07-25 04:27:02 -05:00
|
|
|
// #2582
|
|
|
|
let _: &dyn (::std::any::Any) = &msg;
|
2018-03-05 02:35:58 -06:00
|
|
|
}
|