]> git.proxmox.com Git - rustc.git/blame - src/tools/rustfmt/tests/source/dyn_trait.rs
Update upstream source from tag 'upstream/1.52.1+dfsg1'
[rustc.git] / src / tools / rustfmt / tests / source / dyn_trait.rs
CommitLineData
f20569fa
XL
1#![feature(dyn_trait)]
2
3fn 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 fn method(&self) -> u64;
14 }
15
16 fn f2(a: Box<dyn Very_______________________Long__________________Name____________________Trait+ 'static,>) {}
17
18 // #2582
19 let _: &dyn (::std::any::Any) = &msg;
20}