Skip to content

Commit

Permalink
testsuite: Update and un-xfail #3601 test
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Feb 27, 2013
1 parent 33e7a1f commit dbbdca3
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/test/compile-fail/issue-3601.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
Expand All @@ -8,7 +8,6 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

// xfail-test
struct HTMLImageData {
image: Option<~str>
}
Expand All @@ -25,18 +24,19 @@ enum NodeKind {
Element(ElementData)
}

enum NodeData = {
struct NodeData {
kind: ~NodeKind
};
}

fn main() {
let mut id = HTMLImageData { image: None };
let ed = ElementData { kind: ~HTMLImageElement(id) };
let n = NodeData({kind : ~Element(ed)});
let n = NodeData {kind : ~Element(ed)};
// n.b. span could be better
match n.kind {
~Element(ed) => match ed.kind {
~HTMLImageElement(d) if d.image.is_some() => { true }
~Element(ed) => match ed.kind { //~ ERROR non-exhaustive patterns
~HTMLImageElement(ref d) if d.image.is_some() => { true }
},
_ => fail!(~"WAT") //~ ERROR wat
_ => fail!(~"WAT") //~ ERROR unreachable pattern
};
}

5 comments on commit dbbdca3

@bors
Copy link
Contributor

@bors bors commented on dbbdca3 Feb 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from catamorphism
at catamorphism@dbbdca3

@bors
Copy link
Contributor

@bors bors commented on dbbdca3 Feb 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging catamorphism/rust/issue-3601 = dbbdca3 into auto

@bors
Copy link
Contributor

@bors bors commented on dbbdca3 Feb 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

catamorphism/rust/issue-3601 = dbbdca3 merged ok, testing candidate = fcd4af1

@bors
Copy link
Contributor

@bors bors commented on dbbdca3 Feb 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on dbbdca3 Feb 28, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding incoming to auto = fcd4af1

Please sign in to comment.