diff options
| author | Michael Killough <michaeljkillough@gmail.com> | 2017-05-16 16:13:23 +0700 |
|---|---|---|
| committer | Michael Killough <michaeljkillough@gmail.com> | 2017-05-16 16:17:46 +0700 |
| commit | dcd3c0ed2e5b892aa3e5cae5c90db958fd9c90d6 (patch) | |
| tree | 9c0f6ba366486ddd533aaded12394472dc427a37 /tests/source | |
| parent | 09e5051deed87b4c2eee5be6f5868e14380fe996 (diff) | |
Add test for issue #1366.
As the comments in the issue state: it appears to work now, so this test should just stop any regressions. The second example in the issue description will format to the first, which is then a fixed-point.
Diffstat (limited to 'tests/source')
| -rw-r--r-- | tests/source/issue-1366.rs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/source/issue-1366.rs b/tests/source/issue-1366.rs new file mode 100644 index 00000000000..9d2964fc77c --- /dev/null +++ b/tests/source/issue-1366.rs @@ -0,0 +1,12 @@ +fn main() { + fn f() -> Option<i32> { + Some("fffffffsssssssssddddssssfffffddddff").map(|s| s).map(|s| s.to_string()).map(|res| { + match Some(res) { + Some(ref s) if s == "" => 41, + Some(_) => 42, + _ => 43, + } + }) + } + println!("{:?}", f()) +} |
