diff options
| author | Caleb Cartwright <caleb.cartwright@outlook.com> | 2021-12-29 20:49:39 -0600 |
|---|---|---|
| committer | Caleb Cartwright <caleb.cartwright@outlook.com> | 2021-12-29 20:49:39 -0600 |
| commit | 521fdcbe4ddaa717be2acbeb30f8978d6378fea1 (patch) | |
| tree | 5e021204c2d4503b6990f53c919f54a2f3969734 /src/tools/rustfmt/tests/source | |
| parent | d331cb710f0dd969d779510a49a3bafc7f78a54e (diff) | |
| parent | 4a053f206fd6799a25823c307f7d7f9d897be118 (diff) | |
Merge commit '4a053f206fd6799a25823c307f7d7f9d897be118' into sync-rustfmt-subtree
Diffstat (limited to 'src/tools/rustfmt/tests/source')
| -rw-r--r-- | src/tools/rustfmt/tests/source/async_block.rs | 16 | ||||
| -rw-r--r-- | src/tools/rustfmt/tests/source/match.rs | 19 |
2 files changed, 35 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/source/async_block.rs b/src/tools/rustfmt/tests/source/async_block.rs index 3de51a084d2..18cb4fb5f5c 100644 --- a/src/tools/rustfmt/tests/source/async_block.rs +++ b/src/tools/rustfmt/tests/source/async_block.rs @@ -32,4 +32,20 @@ fn baz() { Ok(()) }, ); + + spawn( + a, + static async || { + action(); + Ok(()) + }, + ); + + spawn( + a, + static async move || { + action(); + Ok(()) + }, + ); } diff --git a/src/tools/rustfmt/tests/source/match.rs b/src/tools/rustfmt/tests/source/match.rs index da20517203a..b5dc9957a2c 100644 --- a/src/tools/rustfmt/tests/source/match.rs +++ b/src/tools/rustfmt/tests/source/match.rs @@ -568,3 +568,22 @@ fn issue_3774() { } } } + +// #4109 +fn issue_4109() { + match () { + _ => { +#[cfg(debug_assertions)] +{ +println!("Foo"); +} +} +} + +match () { +_ => { +#[allow(unsafe_code)] +unsafe {} +} +} +} |
