-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Resolve should make sure variables aren't used before they're declared #481
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
Comments
Disagree. Typestate is the right place to do this, and closures make it unclear anyways. If the error message is bad, that's a different bug. |
I'm not sure how closures make this unclear. I guess the issue is that variable declarations in Rust hoist just like JavaScript. Is this intended behavior? |
As a C/C++ programmer, it's really weird to me that stuff like this is legal:
|
Fixed by e33af7e |
keeperofdakeys
pushed a commit
to keeperofdakeys/rust
that referenced
this issue
Dec 12, 2017
Add execl, execle, execlp I tried to be as close as possible to the existing definitions of `execv` and friends. btw: do you still welcome these PR? Doesn't the [new bindgen/build.rs method](http://fitzgeraldnick.com/2016/12/14/using-libbindgen-in-build-rs.html) offer to automate this crate to 100%
kazcw
pushed a commit
to kazcw/rust
that referenced
this issue
Oct 23, 2018
pdietl
pushed a commit
to pdietl/rust
that referenced
this issue
Apr 23, 2020
Clarify pub(restricted) a bit
celinval
pushed a commit
to celinval/rust-dev
that referenced
this issue
Jun 4, 2024
* initial draft of 2nd tutorial section * add exercise solutions, fix minor issues
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Typestate usually errors out when this happens, but the message is confusing. This should be picked up in resolve.
The text was updated successfully, but these errors were encountered: