diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-05-20 21:25:49 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-05-20 21:25:49 -0700 |
| commit | 1b2dd90f1b23e612f4ab499656d02d367594d45d (patch) | |
| tree | b7778302fcb16a557f5c5709893ecd7b5b77f424 | |
| parent | f0a1df692e9580f5aad837da1a5725f026b19a45 (diff) | |
test: Add a test for fixed issue #11844
Closes #11844
| -rw-r--r-- | src/test/compile-fail/issue-11844.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/compile-fail/issue-11844.rs b/src/test/compile-fail/issue-11844.rs new file mode 100644 index 00000000000..4e11481b5d2 --- /dev/null +++ b/src/test/compile-fail/issue-11844.rs @@ -0,0 +1,19 @@ +// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or +// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license +// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let a = Some(box 1); + match a { + Ok(a) => //~ ERROR: mismatched types + println!("{}",a), //~ ERROR: failed to find an implementation of trait + None => fail!() + } +} + |
