diff options
| author | Martin Juarez <juarezmachadojorgemartin@gmail.com> | 2022-07-26 12:21:22 -0400 |
|---|---|---|
| committer | Yacin Tmimi <yacintmimi@gmail.com> | 2022-07-26 13:06:10 -0400 |
| commit | ed77962d243f93e1690ac62f0b8d733383090240 (patch) | |
| tree | 498473e9a5a1727c30441da6b6396aa9c56d03bb | |
| parent | a451a39dec2bd5d7f0822eaa092e1423b42ea1d3 (diff) | |
| download | rust-ed77962d243f93e1690ac62f0b8d733383090240.tar.gz rust-ed77962d243f93e1690ac62f0b8d733383090240.zip | |
Improvements: Adding tests for the issue-4643.
| -rw-r--r-- | tests/source/issue-4643.rs | 23 | ||||
| -rw-r--r-- | tests/target/issue-4643.rs | 19 |
2 files changed, 42 insertions, 0 deletions
diff --git a/tests/source/issue-4643.rs b/tests/source/issue-4643.rs new file mode 100644 index 00000000000..382072d9004 --- /dev/null +++ b/tests/source/issue-4643.rs @@ -0,0 +1,23 @@ +// output doesn't get corrupted when using comments within generic type parameters of a trait + +pub trait Something< + A, + // some comment + B, + C +> { + fn a(&self, x: A) -> i32; + fn b(&self, x: B) -> i32; + fn c(&self, x: C) -> i32; +} + +pub trait SomethingElse< + A, + /* some comment */ + B, + C +> { + fn a(&self, x: A) -> i32; + fn b(&self, x: B) -> i32; + fn c(&self, x: C) -> i32; +} diff --git a/tests/target/issue-4643.rs b/tests/target/issue-4643.rs new file mode 100644 index 00000000000..ef99e4db382 --- /dev/null +++ b/tests/target/issue-4643.rs @@ -0,0 +1,19 @@ +// output doesn't get corrupted when using comments within generic type parameters of a trait + +pub trait Something< + A, + // some comment + B, + C, +> +{ + fn a(&self, x: A) -> i32; + fn b(&self, x: B) -> i32; + fn c(&self, x: C) -> i32; +} + +pub trait SomethingElse<A, /* some comment */ B, C> { + fn a(&self, x: A) -> i32; + fn b(&self, x: B) -> i32; + fn c(&self, x: C) -> i32; +} |
