https://github.com/hatoo/cfg-yield-test
https://github.com/hatoo/cfg-yield-test
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/hatoo/cfg-yield-test
- Owner: hatoo
- Created: 2019-11-26T13:17:18.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-26T13:29:42.000Z (over 6 years ago)
- Last Synced: 2025-01-28T18:46:12.852Z (over 1 year ago)
- Language: Rust
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
```bash
$ cargo run --features "test_generator"
warning: function is never used: `test_generator`
--> src\main.rs:8:4
|
8 | fn test_generator() {
| ^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
Finished dev [unoptimized + debuginfo] target(s) in 0.04s
Running `target\debug\cfg-yield-test.exe`
Hello, world!
$ cargo run
Compiling cfg-yield-test v0.1.0 (C:\Users\hato2\Desktop\cfg-yield-test)
error[E0658]: yield syntax is experimental
--> src\main.rs:14:9
|
14 | yield 1;
| ^^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/43122
= help: add `#![feature(generators)]` to the crate attributes to enable
error: aborting due to previous error
For more information about this error, try `rustc --explain E0658`.
error: could not compile `cfg-yield-test`.
To learn more, run the command again with --verbose.
```