diff options
Diffstat (limited to 'tests/ui/match/option-result-mismatch-11844.rs')
| -rw-r--r-- | tests/ui/match/option-result-mismatch-11844.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/ui/match/option-result-mismatch-11844.rs b/tests/ui/match/option-result-mismatch-11844.rs new file mode 100644 index 00000000000..24a2004134d --- /dev/null +++ b/tests/ui/match/option-result-mismatch-11844.rs @@ -0,0 +1,10 @@ +//! Regression test for https://github.com/rust-lang/rust/issues/11844 + +fn main() { + let a = Some(Box::new(1)); + match a { + Ok(a) => //~ ERROR: mismatched types + println!("{}",a), + None => panic!() + } +} |
