diff options
Diffstat (limited to 'src/test/ui/borrowck/regions-escape-bound-fn.rs')
-rw-r--r-- | src/test/ui/borrowck/regions-escape-bound-fn.rs | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/test/ui/borrowck/regions-escape-bound-fn.rs b/src/test/ui/borrowck/regions-escape-bound-fn.rs deleted file mode 100644 index f896ae7bd..000000000 --- a/src/test/ui/borrowck/regions-escape-bound-fn.rs +++ /dev/null @@ -1,13 +0,0 @@ -fn with_int<F>(f: F) -where - F: FnOnce(&isize), -{ - let x = 3; - f(&x); -} - -fn main() { - let mut x: Option<&isize> = None; - with_int(|y| x = Some(y)); - //~^ ERROR borrowed data escapes outside of closure -} |