Add various test cases, mostly xfailed
This commit is contained in:
parent
0027874218
commit
fe9a339939
4 changed files with 38 additions and 0 deletions
9
src/test/compile-fail/issue-2951.rs
Normal file
9
src/test/compile-fail/issue-2951.rs
Normal file
|
|
@ -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
src/test/compile-fail/issue-2969.rs
Normal file
9
src/test/compile-fail/issue-2969.rs
Normal file
|
|
@ -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
src/test/compile-fail/issue-3080.rs
Normal file
9
src/test/compile-fail/issue-3080.rs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
// xfail-test
|
||||
enum x = ();
|
||||
impl x {
|
||||
unsafe fn with() { } // This should fail
|
||||
}
|
||||
|
||||
fn main() {
|
||||
x(()).with();
|
||||
}
|
||||
11
src/test/run-pass/issue-3154.rs
Normal file
11
src/test/run-pass/issue-3154.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
struct thing<Q> {
|
||||
x: &Q
|
||||
}
|
||||
|
||||
fn thing<Q>(x: &Q) -> thing<Q> {
|
||||
thing{ x: x }
|
||||
}
|
||||
|
||||
fn main() {
|
||||
thing(&());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue