add tests for 2506
This commit is contained in:
parent
078fbb0819
commit
f8f5d5c68c
2 changed files with 38 additions and 0 deletions
16
tests/source/issue-2506.rs
Normal file
16
tests/source/issue-2506.rs
Normal 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,>) {}
|
||||
|
||||
}
|
22
tests/target/issue-2506.rs
Normal file
22
tests/target/issue-2506.rs
Normal 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,
|
||||
>,
|
||||
) {
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue