about summary refs log tree commit diff
path: root/src/test/ui
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2017-09-03 12:43:05 +0200
committerAriel Ben-Yehuda <ariel.byd@gmail.com>2017-09-20 16:36:24 +0300
commit3a511e06a5949ed9fbc552c161fcbe0cf17e5e2c (patch)
treead23a50f1013e9b7300b6d5f9441fc8b90baa5e1 /src/test/ui
parent1e6ec9f33a82886e45d2fd9abb4eddaf15496920 (diff)
downloadrust-3a511e06a5949ed9fbc552c161fcbe0cf17e5e2c.tar.gz
rust-3a511e06a5949ed9fbc552c161fcbe0cf17e5e2c.zip
Only consider yields coming after the expressions when computing generator interiors
Diffstat (limited to 'src/test/ui')
-rw-r--r--src/test/ui/generator/yield-in-args-rev.rs24
-rw-r--r--src/test/ui/generator/yield-in-args-rev.stderr10
2 files changed, 0 insertions, 34 deletions
diff --git a/src/test/ui/generator/yield-in-args-rev.rs b/src/test/ui/generator/yield-in-args-rev.rs
deleted file mode 100644
index fb0e68136f5..00000000000
--- a/src/test/ui/generator/yield-in-args-rev.rs
+++ /dev/null
@@ -1,24 +0,0 @@
-// Copyright 2017 The Rust Project Developers. See the COPYRIGHT
-// file at the top-level directory of this distribution and at
-// http://rust-lang.org/COPYRIGHT.
-//
-// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
-// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
-// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
-// option. This file may not be copied, modified, or distributed
-// except according to those terms.
-
-#![feature(generators)]
-
-fn foo(_a: (), _b: &bool) {}
-
-// Some examples that probably *could* be accepted, but which we reject for now.
-
-fn bar() {
-    || {
-        let b = true;
-        foo(yield, &b); //~ ERROR
-    };
-}
-
-fn main() { }
diff --git a/src/test/ui/generator/yield-in-args-rev.stderr b/src/test/ui/generator/yield-in-args-rev.stderr
deleted file mode 100644
index 157f8968209..00000000000
--- a/src/test/ui/generator/yield-in-args-rev.stderr
+++ /dev/null
@@ -1,10 +0,0 @@
-error[E0626]: borrow may still be in use when generator yields
-  --> $DIR/yield-in-args-rev.rs:20:21
-   |
-20 |         foo(yield, &b); //~ ERROR
-   |             -----   ^
-   |             |
-   |             possible yield occurs here
-
-error: aborting due to previous error
-