about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2017-07-16 00:28:57 +0200
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2017-07-28 15:46:27 +0200
commitb2d931abbb8a61751862e72d93ec8711aa0a5e75 (patch)
tree19af5241464b4c8d9843465f5ee49db3cba690d4 /src
parent6106f6c5c15e11a8a4eb8e021bab48d1fd3d42c7 (diff)
Fix error message tests again
Diffstat (limited to 'src')
-rw-r--r--src/librustc_borrowck/diagnostics.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/librustc_borrowck/diagnostics.rs b/src/librustc_borrowck/diagnostics.rs
index f8511bc9c7d..3987799ceb6 100644
--- a/src/librustc_borrowck/diagnostics.rs
+++ b/src/librustc_borrowck/diagnostics.rs
@@ -1188,7 +1188,7 @@ This error occurs because a borrow in a generator persists across a
 yield point.
 
 ```compile_fail,E0624
-# #![feature(generators)]
+# #![feature(generators, generator_trait)]
 # use std::ops::Generator;
 let mut b = || {
     let a = &3; // <-- This borrow...
@@ -1206,7 +1206,7 @@ resolve the previous example by removing the borrow and just storing
 the integer by value:
 
 ```
-# #![feature(generators)]
+# #![feature(generators, generator_trait)]
 # use std::ops::Generator;
 let mut b = || {
     let a = 3;
@@ -1223,7 +1223,7 @@ in those cases, something like the `Rc` or `Arc` types may be useful.
 This error also frequently arises with iteration:
 
 ```compile_fail,E0624
-# #![feature(generators)]
+# #![feature(generators, generator_trait)]
 # use std::ops::Generator;
 let mut b = || {
   let v = vec![1,2,3];
@@ -1238,7 +1238,7 @@ Such cases can sometimes be resolved by iterating "by value" (or using
 `into_iter()`) to avoid borrowing:
 
 ```
-# #![feature(generators)]
+# #![feature(generators, generator_trait)]
 # use std::ops::Generator;
 let mut b = || {
   let v = vec![1,2,3];
@@ -1252,7 +1252,7 @@ b.resume();
 If taking ownership is not an option, using indices can work too:
 
 ```
-# #![feature(generators)]
+# #![feature(generators, generator_trait)]
 # use std::ops::Generator;
 let mut b = || {
   let v = vec![1,2,3];