rust/tests/source/issue-2506.rs
Seiichi Uchida f1d29ff580 Update tests for braces on trait
Test that the opening brace of trait with long name or bounds with multiple
lines will be put on the next line.
2018-03-12 07:48:31 +09:00

16 lines
473 B
Rust

#![feature(dyn_trait)]
fn main() {
// checks rustfmt doesn't remove dyn
trait MyTrait {
fn method(&self) -> u64;
}
fn f1(a: Box<dyn MyTrait>) {}
// checks if line wrap works correctly
trait Very_______________________Long__________________Name_______________________________Trait {
fn method(&self) -> u64;
}
fn f2(a: Box<dyn Very_______________________Long__________________Name____________________Trait+ 'static,>) {}
}