summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-4577.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue-4577.rs')
-rw-r--r--src/tools/rustfmt/tests/target/issue-4577.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-4577.rs b/src/tools/rustfmt/tests/target/issue-4577.rs
new file mode 100644
index 000000000..1bd9eb6b8
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/issue-4577.rs
@@ -0,0 +1,15 @@
+fn main() {
+ let s: String = "ABAABBAA"
+ .chars()
+ .filter(|c| if *c == 'A' { true } else { false })
+ .map(|c| -> char {
+ if c == 'A' {
+ '0'
+ } else {
+ '1'
+ }
+ })
+ .collect();
+
+ println!("{}", s);
+}