Skip to content

Commit 8b96bc1

Browse files
committed
Split test cases of rust-lang#5407 and rust-lang#4649 into separate files (per review comment)
1 parent 1da9006 commit 8b96bc1

File tree

8 files changed

+68
-64
lines changed

8 files changed

+68
-64
lines changed

tests/source/issue-4649/one.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// rustfmt-version: One
2+
3+
// Original from #4649
4+
trait Foo {
5+
fn bar(&self)
6+
where
7+
// Self: Bar
8+
// Some comment
9+
;
10+
}
11+
12+
fn foo<T>()
13+
where
14+
// T: Bar,
15+
// Some comment
16+
{
17+
println!("foo");
18+
}

tests/source/issue-4649/two.rs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// rustfmt-version: Two
2+
3+
// Original from #4649
4+
trait Foo {
5+
fn bar(&self)
6+
where
7+
// Self: Bar
8+
// Some comment
9+
;
10+
}
11+
12+
fn foo<T>()
13+
where
14+
// T: Bar,
15+
// Some comment
16+
{
17+
println!("foo");
18+
}

tests/source/issue-5407/one.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,6 @@ String::new()
1515
}
1616
}
1717

18-
// Original from #4649
19-
trait Foo {
20-
fn bar(&self)
21-
where
22-
// Self: Bar
23-
// Some comment
24-
;
25-
}
26-
27-
fn foo<T>()
28-
where
29-
// T: Bar,
30-
// Some comment
31-
{
32-
println!("foo");
33-
}
34-
3518
// Return-type with no "where" - one comment
3619
fn main () {
3720
fn foo1() -> String /* same-line with ret-type and brace comment */ {

tests/source/issue-5407/two.rs

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,6 @@ fn foo2() -> String
1414
String::new()
1515
}
1616
}
17-
18-
// Original from #4649
19-
trait Foo {
20-
fn bar(&self)
21-
where
22-
// Self: Bar
23-
// Some comment
24-
;
25-
}
26-
27-
fn foo<T>()
28-
where
29-
// T: Bar,
30-
// Some comment
31-
{
32-
println!("foo");
33-
}
3417

3518
// Return-type with no "where" - one comment
3619
fn main () {

tests/target/issue-4649/one.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// rustfmt-version: One
2+
3+
// Original from #4649
4+
trait Foo {
5+
fn bar(&self)
6+
// Self: Bar
7+
// Some comment
8+
;
9+
}
10+
11+
fn foo<T>()
12+
// T: Bar,
13+
// Some comment
14+
{
15+
println!("foo");
16+
}

tests/target/issue-4649/two.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// rustfmt-version: Two
2+
3+
// Original from #4649
4+
trait Foo {
5+
fn bar(&self)
6+
// Self: Bar
7+
// Some comment
8+
;
9+
}
10+
11+
fn foo<T>()
12+
// T: Bar,
13+
// Some comment
14+
{
15+
println!("foo");
16+
}

tests/target/issue-5407/one.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,6 @@ mod inner {
1313
}
1414
}
1515

16-
// Original from #4649
17-
trait Foo {
18-
fn bar(&self)
19-
// Self: Bar
20-
// Some comment
21-
;
22-
}
23-
24-
fn foo<T>()
25-
// T: Bar,
26-
// Some comment
27-
{
28-
println!("foo");
29-
}
30-
3116
// Return-type with no "where" - one comment
3217
fn main() {
3318
fn foo1() -> String /* same-line with ret-type and brace comment */ {}

tests/target/issue-5407/two.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,6 @@ mod inner {
1313
}
1414
}
1515

16-
// Original from #4649
17-
trait Foo {
18-
fn bar(&self)
19-
// Self: Bar
20-
// Some comment
21-
;
22-
}
23-
24-
fn foo<T>()
25-
// T: Bar,
26-
// Some comment
27-
{
28-
println!("foo");
29-
}
30-
3116
// Return-type with no "where" - one comment
3217
fn main() {
3318
fn foo1() -> String /* same-line with ret-type and brace comment */ {}

0 commit comments

Comments
 (0)