Skip to content

Commit ed77962

Browse files
jmj0502ytmimi
authored andcommitted
Improvements: Adding tests for the issue-4643.
1 parent a451a39 commit ed77962

File tree

2 files changed

+42
-0
lines changed

2 files changed

+42
-0
lines changed

tests/source/issue-4643.rs

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// output doesn't get corrupted when using comments within generic type parameters of a trait
2+
3+
pub trait Something<
4+
A,
5+
// some comment
6+
B,
7+
C
8+
> {
9+
fn a(&self, x: A) -> i32;
10+
fn b(&self, x: B) -> i32;
11+
fn c(&self, x: C) -> i32;
12+
}
13+
14+
pub trait SomethingElse<
15+
A,
16+
/* some comment */
17+
B,
18+
C
19+
> {
20+
fn a(&self, x: A) -> i32;
21+
fn b(&self, x: B) -> i32;
22+
fn c(&self, x: C) -> i32;
23+
}

tests/target/issue-4643.rs

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// output doesn't get corrupted when using comments within generic type parameters of a trait
2+
3+
pub trait Something<
4+
A,
5+
// some comment
6+
B,
7+
C,
8+
>
9+
{
10+
fn a(&self, x: A) -> i32;
11+
fn b(&self, x: B) -> i32;
12+
fn c(&self, x: C) -> i32;
13+
}
14+
15+
pub trait SomethingElse<A, /* some comment */ B, C> {
16+
fn a(&self, x: A) -> i32;
17+
fn b(&self, x: B) -> i32;
18+
fn c(&self, x: C) -> i32;
19+
}

0 commit comments

Comments
 (0)