Remove test that tested behavior of unchecked blocks
We don't have unchecked blocks anymore.
This commit is contained in:
parent
d58e0e30ed
commit
6b65aed350
1 changed files with 0 additions and 34 deletions
|
|
@ -1,34 +0,0 @@
|
|||
// xfail-test
|
||||
// xfail-fast
|
||||
#[legacy_modes];
|
||||
|
||||
fn impure(_i: int) {}
|
||||
|
||||
// check that unchecked alone does not override borrowck:
|
||||
fn foo(v: &const Option<int>) {
|
||||
match *v {
|
||||
Some(ref i) => {
|
||||
//~^ ERROR illegal borrow unless pure
|
||||
unsafe {
|
||||
impure(*i); //~ NOTE impure due to access to impure function
|
||||
}
|
||||
}
|
||||
None => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn bar(v: &const Option<int>) {
|
||||
match *v {
|
||||
Some(ref i) => {
|
||||
unsafe {
|
||||
impure(*i);
|
||||
}
|
||||
}
|
||||
None => {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue