mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 00:34:06 +00:00
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,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…
Reference in New Issue
Block a user