]> git.lizzy.rs Git - rust.git/blob - src/tools/rustfmt/tests/target/dyn_trait.rs
Merge commit 'e36a20c24f35a4cee82bbdc600289104c9237c22' into ra-sync-and-pms-component
[rust.git] / src / tools / rustfmt / tests / target / dyn_trait.rs
1 #![feature(dyn_trait)]
2
3 fn main() {
4     // #2506
5     // checks rustfmt doesn't remove dyn
6     trait MyTrait {
7         fn method(&self) -> u64;
8     }
9     fn f1(a: Box<dyn MyTrait>) {}
10
11     // checks if line wrap works correctly
12     trait Very_______________________Long__________________Name_______________________________Trait
13     {
14         fn method(&self) -> u64;
15     }
16
17     fn f2(
18         a: Box<
19             dyn Very_______________________Long__________________Name____________________Trait
20                 + 'static,
21         >,
22     ) {
23     }
24
25     // #2582
26     let _: &dyn (::std::any::Any) = &msg;
27 }