summaryrefslogtreecommitdiffstats
path: root/src/test/ui/span/regions-escape-loop-via-variable.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/span/regions-escape-loop-via-variable.rs')
-rw-r--r--src/test/ui/span/regions-escape-loop-via-variable.rs14
1 files changed, 0 insertions, 14 deletions
diff --git a/src/test/ui/span/regions-escape-loop-via-variable.rs b/src/test/ui/span/regions-escape-loop-via-variable.rs
deleted file mode 100644
index ad468896b..000000000
--- a/src/test/ui/span/regions-escape-loop-via-variable.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-fn main() {
- let x = 3;
-
- // Here, the variable `p` gets inferred to a type with a lifetime
- // of the loop body. The regionck then determines that this type
- // is invalid.
- let mut p = &x;
-
- loop {
- let x = 1 + *p;
- p = &x;
- }
- //~^^ ERROR `x` does not live long enough
-}