Created
July 6, 2016 22:36
-
-
Save erickt/4039add4a45e13598f8192e0f5e96f35 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
error: unresolved name `y` [--explain E0425] | |
--> tests/test_generator.rs:13:9 | |
|> | |
13 |> y + 1 | |
|> ^ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#[generator] | |
fn gen_ints() -> usize { | |
let x = { | |
yield_!(1); | |
let y = 2; | |
yield_!(2); | |
y + 1 | |
}; | |
yield_!(x); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment