-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Modify RFC #803 (type ascription) to make type ascription expressions lvalues #987
Conversation
The history seems strange? |
Yeah, I screwed the history up some how, I'll try to fix it at some point |
Fixed the history and addressed @pnkfelix's comment |
+1 definitely an improvement. Would be nice if for the assignment case ( |
Hear ye, hear ye. This RFC is entering the final comment period. |
Just to clarify, this would allow writing the following? let x;
x: i32 = 10; |
The proposed solution is that type ascription expressions are lvalues. If the | ||
type ascription expression is in reference context, then we require the ascribed | ||
type to exactly match the type of the expression, i.e., neither subtyping nor | ||
coercion is allowed. These reference contexts are as follows (where <expr> is a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This <expr>
renders funny. You should add verbatim quotes.
@huonw yes. |
@nikomatsakis updated the text |
It's official... the language subteam has decided to accept this RFC. |
No description provided.