summaryrefslogtreecommitdiffstats
path: root/src/test/ui/nll/user-annotations/closure-substs.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/nll/user-annotations/closure-substs.rs')
-rw-r--r--src/test/ui/nll/user-annotations/closure-substs.rs31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/test/ui/nll/user-annotations/closure-substs.rs b/src/test/ui/nll/user-annotations/closure-substs.rs
deleted file mode 100644
index f7af54e8d..000000000
--- a/src/test/ui/nll/user-annotations/closure-substs.rs
+++ /dev/null
@@ -1,31 +0,0 @@
-// Test that we enforce user-provided type annotations on closures.
-
-fn foo<'a>() {
- // Here `x` is free in the closure sig:
- |x: &'a i32| -> &'static i32 {
- return x; //~ ERROR lifetime may not live long enough
- };
-}
-
-fn foo1() {
- // Here `x` is bound in the closure sig:
- |x: &i32| -> &'static i32 {
- return x; //~ ERROR lifetime may not live long enough
- };
-}
-
-fn bar<'a>() {
- // Here `x` is free in the closure sig:
- |x: &'a i32, b: fn(&'static i32)| {
- b(x); //~ ERROR lifetime may not live long enough
- };
-}
-
-fn bar1() {
- // Here `x` is bound in the closure sig:
- |x: &i32, b: fn(&'static i32)| {
- b(x); //~ ERROR borrowed data escapes outside of closure
- };
-}
-
-fn main() {}