Skip to content

Commit

Permalink
Add various test cases, mostly xfailed
Browse files Browse the repository at this point in the history
  • Loading branch information
catamorphism committed Dec 7, 2012
1 parent 0027874 commit fe9a339
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/compile-fail/issue-2951.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// xfail-test
fn foo<T, U>(x: T, y: U) {
let mut xx = x;
xx = y; // error message should mention T and U, not 'a and 'b
}

fn main() {

}
9 changes: 9 additions & 0 deletions src/test/compile-fail/issue-2969.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// xfail-test
fn main()
{
// See #2969 -- error message should be improved
let mut x = [mut 1, 2, 4];
let v : &int = &x[2];
x[2] = 6;
assert *v == 6;
}
9 changes: 9 additions & 0 deletions src/test/compile-fail/issue-3080.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// xfail-test
enum x = ();
impl x {
unsafe fn with() { } // This should fail
}

fn main() {
x(()).with();
}
11 changes: 11 additions & 0 deletions src/test/run-pass/issue-3154.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
struct thing<Q> {
x: &Q
}

fn thing<Q>(x: &Q) -> thing<Q> {
thing{ x: x }
}

fn main() {
thing(&());
}

0 comments on commit fe9a339

Please sign in to comment.