-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add various test cases, mostly xfailed
- Loading branch information
1 parent
0027874
commit fe9a339
Showing
4 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() { | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(&()); | ||
} |