diff options
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue-447.rs')
-rw-r--r-- | src/tools/rustfmt/tests/target/issue-447.rs | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-447.rs b/src/tools/rustfmt/tests/target/issue-447.rs new file mode 100644 index 000000000..d41cdb65c --- /dev/null +++ b/src/tools/rustfmt/tests/target/issue-447.rs @@ -0,0 +1,40 @@ +// rustfmt-normalize_comments: true + +fn main() { + if + // shouldn't be dropped + // shouldn't be dropped + cond + // shouldn't be dropped + // shouldn't be dropped + { + } + // shouldn't be dropped + // shouldn't be dropped + else + // shouldn't be dropped + // shouldn't be dropped + if + // shouldn't be dropped + // shouldn't be dropped + cond + // shouldn't be dropped + // shouldn't be dropped + { + } + // shouldn't be dropped + // shouldn't be dropped + else + // shouldn't be dropped + // shouldn't be dropped + { + } + + if + // shouldn't be dropped + // shouldn't be dropped + let Some(x) = y + // shouldn't be dropped + // shouldn't be dropped + {} +} |