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.
This commit is contained in:
Seiichi Uchida 2018-03-10 14:29:01 +09:00 committed by topecongiro
parent f5ebcd922e
commit f1d29ff580
4 changed files with 9 additions and 6 deletions

View file

@ -7,7 +7,7 @@ fn main() {
fn f1(a: Box<dyn MyTrait>) {} fn f1(a: Box<dyn MyTrait>) {}
// checks if line wrap works correctly // checks if line wrap works correctly
trait Very_______________________Long__________________Name____________________Trait { trait Very_______________________Long__________________Name_______________________________Trait {
fn method(&self) -> u64; fn method(&self) -> u64;
} }

View file

@ -183,7 +183,8 @@ pub trait Number
+ BitAnd<Self, Output = Self> + BitAnd<Self, Output = Self>
+ BitOr<Self, Output = Self> + BitOr<Self, Output = Self>
+ BitAndAssign + BitAndAssign
+ BitOrAssign { + BitOrAssign
{
// test // test
fn zero() -> Self; fn zero() -> Self;
} }
@ -201,7 +202,8 @@ pub trait SomeTrait
+ Display + Display
+ Write + Write
+ Read + Read
+ FromStr { + FromStr
{
// comment // comment
} }

View file

@ -7,8 +7,8 @@ fn main() {
fn f1(a: Box<dyn MyTrait>) {} fn f1(a: Box<dyn MyTrait>) {}
// checks if line wrap works correctly // checks if line wrap works correctly
trait Very_______________________Long__________________Name____________________Trait trait Very_______________________Long__________________Name_______________________________Trait
{ {
fn method(&self) -> u64; fn method(&self) -> u64;
} }

View file

@ -106,7 +106,8 @@ trait MyTrait<
BBBBBBBBBBBBBBBBBBBB, BBBBBBBBBBBBBBBBBBBB,
CCCCCCCCCCCCCCCCCCCC, CCCCCCCCCCCCCCCCCCCC,
DDDDDDDDDDDDDDDDDDDD, DDDDDDDDDDDDDDDDDDDD,
> { >
{
fn foo() {} fn foo() {}
} }