add tests for 2506

This commit is contained in:
kngwyu 2018-03-05 17:35:58 +09:00
parent 078fbb0819
commit f8f5d5c68c
2 changed files with 38 additions and 0 deletions

View file

@ -0,0 +1,16 @@
#![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,>) {}
}

View file

@ -0,0 +1,22 @@
#![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,
>,
) {
}
}