-
Notifications
You must be signed in to change notification settings - Fork 13.3k
remove semicolon for suppressed the expressions to unit #19699
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
Please open an issue on Rust by Example, rather than on Rust itself. |
this is the rust issue. let z:()= {
// The semicolon suppresses this expression and `()` is assigned to `z`
2 * x
} or let z= {
// The semicolon suppresses this expression and `()` is assigned to `z`
2 * x
()
} |
If you're interested in changing the semantics of the language, then the appropriate venue is https://github.com/rust-lang/rfcs , as all significant semantics must go through one. |
@steveklabnik thanks ,very open and nice. |
lnicola
pushed a commit
to lnicola/rust
that referenced
this issue
May 5, 2025
fix: Escape raw names in labels properly
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi I am new to rust,and when I am reading examples from rust by example,I found this one is really confusing.
why not just make the return type as unit,then the return type of the expression just been ignored just like scala.
The text was updated successfully, but these errors were encountered: