diff options
Diffstat (limited to 'src/test/ui/borrowck/borrow-raw-address-of-borrowed.rs')
-rw-r--r-- | src/test/ui/borrowck/borrow-raw-address-of-borrowed.rs | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/src/test/ui/borrowck/borrow-raw-address-of-borrowed.rs b/src/test/ui/borrowck/borrow-raw-address-of-borrowed.rs deleted file mode 100644 index f25fd7f66..000000000 --- a/src/test/ui/borrowck/borrow-raw-address-of-borrowed.rs +++ /dev/null @@ -1,22 +0,0 @@ -#![feature(raw_ref_op)] - -fn address_of_shared() { - let mut x = 0; - let y = &x; - - let q = &raw mut x; //~ ERROR cannot borrow - - drop(y); -} - -fn address_of_mutably_borrowed() { - let mut x = 0; - let y = &mut x; - - let p = &raw const x; //~ ERROR cannot borrow - let q = &raw mut x; //~ ERROR cannot borrow - - drop(y); -} - -fn main() {} |