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.
This commit is contained in:
parent
09e5051dee
commit
dcd3c0ed2e
12
tests/source/issue-1366.rs
Normal file
12
tests/source/issue-1366.rs
Normal file
@ -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())
|
||||
}
|
13
tests/target/issue-1366.rs
Normal file
13
tests/target/issue-1366.rs
Normal file
@ -0,0 +1,13 @@
|
||||
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())
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user