Closed

Description
The following code worked as of 0.11.0
but no longer produces an expected result on master.
fn main() {
let mut foo = Some("Kitten".to_string());
match foo {
None => {},
Some(x) => {
foo = Some(x);
}
};
println!("'{:s}'", foo.unwrap());
}
on 0.11.0:
'Kitten'
on master:
''
Another example
fn main() {
let mut foo = Some(box 5i);
match foo {
None => {},
Some(x) => {
foo = Some(x);
}
};
println!("'{}'", foo.unwrap());
}
on 0.11.0:
'5'
on master:
task '<main>' failed at 'called `Option::unwrap()` on a `None` value', /build/rust-git/src/rust/src/libcore/option.rs:265
Metadata
Metadata
Assignees
Labels
No labels