diff options
| author | Michael Goulet <michael@errs.io> | 2023-08-27 13:18:30 -0700 |
|---|---|---|
| committer | Caleb Cartwright <calebcartwright@users.noreply.github.com> | 2024-09-12 10:27:02 -0500 |
| commit | d6d9e76240cdc8168c91d7bd89de37ef863b87bb (patch) | |
| tree | b5a7f6665dfc26451c9ddea38090c217dcd5b9c0 | |
| parent | df06d7eb09f006499e9413cf8369384f96d7bacc (diff) | |
| download | rust-d6d9e76240cdc8168c91d7bd89de37ef863b87bb.tar.gz rust-d6d9e76240cdc8168c91d7bd89de37ef863b87bb.zip | |
Add tests showing how comments are handled
| -rw-r--r-- | tests/source/type-alias-where-clauses-with-comments.rs | 31 | ||||
| -rw-r--r-- | tests/target/type-alias-where-clauses-with-comments.rs | 39 |
2 files changed, 70 insertions, 0 deletions
diff --git a/tests/source/type-alias-where-clauses-with-comments.rs b/tests/source/type-alias-where-clauses-with-comments.rs new file mode 100644 index 00000000000..722ebac47ac --- /dev/null +++ b/tests/source/type-alias-where-clauses-with-comments.rs @@ -0,0 +1,31 @@ +type Foo // comment1 + // interlinear1 +where // comment2 + // interlinear2 +A: B, // comment3 +C: D, // comment4 + // interlinear3 += E; // comment5 + +type Foo // comment6 + // interlinear4 +where// comment7 + // interlinear5 +A: B, // comment8 +C: D, // comment9 + // interlinear6 += E // comment10 + // interlinear7 +where // comment11 + // interlinear8 +F: G, // comment12 +H: I; // comment13 + +type Foo // comment14 + // interlinear9 += E // comment15 + // interlinear10 +where // comment16 + // interlinear11 +F: G,// comment17 +H: I;// comment18 diff --git a/tests/target/type-alias-where-clauses-with-comments.rs b/tests/target/type-alias-where-clauses-with-comments.rs new file mode 100644 index 00000000000..25c38916376 --- /dev/null +++ b/tests/target/type-alias-where-clauses-with-comments.rs @@ -0,0 +1,39 @@ +type Foo +// comment1 +// interlinear1 +where + // comment2 + // interlinear2 + A: B, // comment3 + C: D, // comment4 +// interlinear3 += E; // comment5 + +type Foo +// comment6 +// interlinear4 +where + // comment7 + // interlinear5 + A: B, // comment8 + C: D, // comment9 +// interlinear6 += E +// comment10 +// interlinear7 +where + // comment11 + // interlinear8 + F: G, // comment12 + H: I; // comment13 + +type Foo // comment14 + // interlinear9 + = E +// comment15 +// interlinear10 +where + // comment16 + // interlinear11 + F: G, // comment17 + H: I; // comment18 |
