File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed
branches/try/src/test/compile-fail Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 2
2
refs/heads/master: 3bbcac322669cff3abde5be937cc4ec3860f3985
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: a6d9689399d091c3265f00434a69c551a61c28dc
5
- refs/heads/try: 6bff18ea0de2f96a4103c11bc183b380f6d2c83a
5
+ refs/heads/try: fcd4af169fc6ed45090625c354460a911177533b
6
6
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
7
7
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8
8
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
Original file line number Diff line number Diff line change 1
- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
8
8
// option. This file may not be copied, modified, or distributed
9
9
// except according to those terms.
10
10
11
- // xfail-test
12
11
struct HTMLImageData {
13
12
image : Option < ~str >
14
13
}
@@ -25,18 +24,19 @@ enum NodeKind {
25
24
Element ( ElementData )
26
25
}
27
26
28
- enum NodeData = {
27
+ struct NodeData {
29
28
kind : ~NodeKind
30
- } ;
29
+ }
31
30
32
31
fn main ( ) {
33
32
let mut id = HTMLImageData { image : None } ;
34
33
let ed = ElementData { kind : ~HTMLImageElement ( id) } ;
35
- let n = NodeData ( { kind : ~Element ( ed) } ) ;
34
+ let n = NodeData { kind : ~Element ( ed) } ;
35
+ // n.b. span could be better
36
36
match n. kind {
37
- ~Element ( ed) => match ed. kind {
38
- ~HTMLImageElement ( d) if d. image . is_some ( ) => { true }
37
+ ~Element ( ed) => match ed. kind { //~ ERROR non-exhaustive patterns
38
+ ~HTMLImageElement ( ref d) if d. image . is_some ( ) => { true }
39
39
} ,
40
- _ => fail ! ( ~"WAT ") //~ ERROR wat
40
+ _ => fail ! ( ~"WAT ") //~ ERROR unreachable pattern
41
41
} ;
42
42
}
You can’t perform that action at this time.
0 commit comments