-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support Rust's Generator
feature
#416
Labels
[C] Bug
This is a bug. Something isn't working.
[C] Feature / Enhancement
A new feature request or enhancement to an existing feature.
Comments
avanhatt
added
[C] Bug
This is a bug. Something isn't working.
[C] Feature / Enhancement
A new feature request or enhancement to an existing feature.
labels
Aug 11, 2021
98 tasks
Kani crashes on the following program: #![feature(generators, generator_trait)]
use std::ops::{Generator, GeneratorState};
use std::pin::Pin;
fn main() {
let mut generator = || {
yield 1;
return "foo"
};
match Pin::new(&mut generator).resume(()) {
GeneratorState::Yielded(1) => {}
_ => panic!("unexpected return from resume"),
}
match Pin::new(&mut generator).resume(()) {
GeneratorState::Complete("foo") => {}
_ => panic!("unexpected return from resume"),
}
} We should emit an error and exit gracefully until we support this feature. |
Emit an error instead of crash, then remove the "must have" label, and switch "bug" to "feature". |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[C] Bug
This is a bug. Something isn't working.
[C] Feature / Enhancement
A new feature request or enhancement to an existing feature.
Rust has a newish Generator type.
We currently fail with unimplemented for this type:
This is used by the popular
tokio
crate.The text was updated successfully, but these errors were encountered: