Fix more tests with GeneratorState rename

This commit is contained in:
Alex Crichton 2017-07-21 20:48:46 -07:00 committed by John Kåre Alsaker
parent be0a9b8958
commit ff996853fe
5 changed files with 12 additions and 12 deletions

View File

@ -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

View File

@ -10,7 +10,7 @@
#![feature(generators, generator_trait)]
use std::ops::{State, Generator};
use std::ops::{GeneratorState, Generator};
use std::cell::Cell;
fn foo(x: &i32) {

View File

@ -10,7 +10,7 @@
#![feature(generators, generator_trait)]
use std::ops::{State, Generator};
use std::ops::{GeneratorState, Generator};
use std::cell::Cell;
fn yield_during_iter_owned_data(x: Vec<i32>) {

View File

@ -10,7 +10,7 @@
#![feature(generators, generator_trait)]
use std::ops::{State, Generator};
use std::ops::{GeneratorState, Generator};
use std::cell::Cell;
fn borrow_local_inline() {

View File

@ -10,7 +10,7 @@
#![feature(generators, generator_trait)]
use std::ops::{State, Generator};
use std::ops::{GeneratorState, Generator};
use std::cell::Cell;
fn reborrow_shared_ref(x: &i32) {