about summary refs log tree commit diff
path: root/src/libcore/ops
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-07-21 20:48:46 -0700
committerJohn Kåre Alsaker <john.kare.alsaker@gmail.com>2017-07-28 15:47:55 +0200
commitff996853feeb2f87608c49988553ff4e85f1c319 (patch)
tree11d7aca9719bc5b5f33f1b10afa36b3d6ab6719a /src/libcore/ops
parentbe0a9b89583d712557268e9d813e5fac87846561 (diff)
downloadrust-ff996853feeb2f87608c49988553ff4e85f1c319.tar.gz
rust-ff996853feeb2f87608c49988553ff4e85f1c319.zip
Fix more tests with `GeneratorState` rename
Diffstat (limited to 'src/libcore/ops')
-rw-r--r--src/libcore/ops/generator.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/libcore/ops/generator.rs b/src/libcore/ops/generator.rs
index a8217676653..798c182bc6e 100644
--- a/src/libcore/ops/generator.rs
+++ b/src/libcore/ops/generator.rs
@@ -48,7 +48,7 @@ pub enum GeneratorState<Y, R> {
 /// ```rust
 /// #![feature(generators, generator_trait)]
 ///
-/// use std::ops::{Generator, State};
+/// use std::ops::{Generator, GeneratorState};
 ///
 /// fn main() {
 ///     let mut generator = || {
@@ -57,11 +57,11 @@ pub enum GeneratorState<Y, R> {
 ///     };
 ///
 ///     match generator.resume() {
-///         State::Yielded(1) => {}
+///         GeneratorState::Yielded(1) => {}
 ///         _ => panic!("unexpected return from resume"),
 ///     }
 ///     match generator.resume() {
-///         State::Complete("foo") => {}
+///         GeneratorState::Complete("foo") => {}
 ///         _ => panic!("unexpected return from resume"),
 ///     }
 /// }
@@ -100,11 +100,11 @@ pub trait Generator {
     ///
     /// # Return value
     ///
-    /// The `State` enum returned from this function indicates what state the
-    /// generator is in upon returning. If the `Yielded` variant is returned
-    /// then the generator has reached a suspension point and a value has been
-    /// yielded out. Generators in this state are available for resumption at a
-    /// later point.
+    /// The `GeneratorState` enum returned from this function indicates what
+    /// state the generator is in upon returning. If the `Yielded` variant is
+    /// returned then the generator has reached a suspension point and a value
+    /// has been yielded out. Generators in this state are available for
+    /// resumption at a later point.
     ///
     /// If `Complete` is returned then the generator has completely finished
     /// with the value provided. It is invalid for the generator to be resumed