Skip to content

Commit fe9a339

Browse files
committed
Add various test cases, mostly xfailed
1 parent 0027874 commit fe9a339

File tree

4 files changed

+38
-0
lines changed

4 files changed

+38
-0
lines changed

src/test/compile-fail/issue-2951.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// xfail-test
2+
fn foo<T, U>(x: T, y: U) {
3+
let mut xx = x;
4+
xx = y; // error message should mention T and U, not 'a and 'b
5+
}
6+
7+
fn main() {
8+
9+
}

src/test/compile-fail/issue-2969.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// xfail-test
2+
fn main()
3+
{
4+
// See #2969 -- error message should be improved
5+
let mut x = [mut 1, 2, 4];
6+
let v : &int = &x[2];
7+
x[2] = 6;
8+
assert *v == 6;
9+
}

src/test/compile-fail/issue-3080.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// xfail-test
2+
enum x = ();
3+
impl x {
4+
unsafe fn with() { } // This should fail
5+
}
6+
7+
fn main() {
8+
x(()).with();
9+
}

src/test/run-pass/issue-3154.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
struct thing<Q> {
2+
x: &Q
3+
}
4+
5+
fn thing<Q>(x: &Q) -> thing<Q> {
6+
thing{ x: x }
7+
}
8+
9+
fn main() {
10+
thing(&());
11+
}

0 commit comments

Comments
 (0)