Skip to content

Commit

Permalink
Add test case for issue 6127
Browse files Browse the repository at this point in the history
  • Loading branch information
ytmimi committed Mar 30, 2024
1 parent 1b464f9 commit be9e00a
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
32 changes: 32 additions & 0 deletions tests/source/issue_6127.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// rustfmt-version: Two

trait Foo:
Fn(
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
) -> ReallyLongTypeName
{
}


trait Bar:
Fn(
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
) -> ReallyLongTypeName + Debug + Clone
{
}

trait FooBar:
Clone + Debug + Fn(
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
) -> ReallyLongTypeName
{
}
35 changes: 35 additions & 0 deletions tests/target/issue_6127.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
// rustfmt-version: Two

trait Foo:
Fn(
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
) -> ReallyLongTypeName
{
}

trait Bar:
Fn(
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
) -> ReallyLongTypeName
+ Debug
+ Clone
{
}

trait FooBar:
Clone
+ Debug
+ Fn(
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
ReallyLongTypeName,
) -> ReallyLongTypeName
{
}

0 comments on commit be9e00a

Please sign in to comment.