Add a run-fail test for result::get, get rid of a FIXME. Also some random other tests, mostly xfailed.
This commit is contained in:
parent
79e572ebbb
commit
ea0063788b
8 changed files with 113 additions and 1 deletions
23
src/test/compile-fail/issue-1451.rs
Normal file
23
src/test/compile-fail/issue-1451.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
// xfail-test
|
||||
type T = { mut f: fn@() };
|
||||
type S = { f: fn@() };
|
||||
|
||||
fn fooS(t: S) {
|
||||
}
|
||||
|
||||
fn fooT(t: T) {
|
||||
}
|
||||
|
||||
fn bar() {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let x: fn@() = bar;
|
||||
fooS({f: x});
|
||||
fooS({f: bar});
|
||||
|
||||
let x: fn@() = bar;
|
||||
fooT({mut f: x});
|
||||
fooT({mut f: bar});
|
||||
}
|
||||
|
||||
11
src/test/compile-fail/issue-1871.rs
Normal file
11
src/test/compile-fail/issue-1871.rs
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
// xfail-test
|
||||
fn main() {
|
||||
let f = 42;
|
||||
|
||||
let _g = if f < 5 {
|
||||
f.honk();
|
||||
}
|
||||
else {
|
||||
12
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue