diff options
Diffstat (limited to 'src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs')
-rw-r--r-- | src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs b/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs deleted file mode 100644 index ffb2da280..000000000 --- a/src/test/ui/borrowck/borrowck-local-borrow-with-panic-outlives-fn.rs +++ /dev/null @@ -1,10 +0,0 @@ -fn cplusplus_mode_exceptionally_unsafe(x: &mut Option<&'static mut isize>) { - let mut z = (0, 0); - *x = Some(&mut z.1); - //~^ ERROR `z.1` does not live long enough [E0597] - panic!("catch me for a dangling pointer!") -} - -fn main() { - cplusplus_mode_exceptionally_unsafe(&mut None); -} |