diff options
| author | Frank King <frankking1729@gmail.com> | 2024-01-06 15:52:22 +0800 |
|---|---|---|
| committer | Frank King <frankking1729@gmail.com> | 2024-02-12 12:47:30 +0800 |
| commit | 7d012e8f19591f224b25cabf64d9da2bb2e08166 (patch) | |
| tree | 9d9d30be2747c4e38f039dd53b06c5f471ea5f35 | |
| parent | 0c0df4efe09072013067fc5829996cc53f5c9bd3 (diff) | |
| download | rust-7d012e8f19591f224b25cabf64d9da2bb2e08166.tar.gz rust-7d012e8f19591f224b25cabf64d9da2bb2e08166.zip | |
Add rustfmt test from #117942
| -rw-r--r-- | src/tools/rustfmt/tests/target/anonymous-types.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/anonymous-types.rs b/src/tools/rustfmt/tests/target/anonymous-types.rs index 8e08c314ed1..e8c2d83878c 100644 --- a/src/tools/rustfmt/tests/target/anonymous-types.rs +++ b/src/tools/rustfmt/tests/target/anonymous-types.rs @@ -16,4 +16,16 @@ struct Foo { e: f32, } +// Test for https://github.com/rust-lang/rust/issues/117942 +struct Foo { + _: union { + #[rustfmt::skip] + f: String, + }, + #[rustfmt::skip] + _: struct { + g: i32, + }, +} + fn main() {} |
