-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Remove ObsoleteInPlace
#60803
Remove ObsoleteInPlace
#60803
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
036e368
to
1642e7c
Compare
src/test/ui/placement-syntax.rs
Outdated
fn main() { | ||
let x = -5; | ||
if x<-1 { | ||
//~^ ERROR emplacement syntax is obsolete | ||
if x<-1 { // ok: parses as a comparison |
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.
So I think it's good that we remove it from the AST and such, but keeping options open re. <-
and not introducing new stable behavior would be good so let's reject this in the parser?
Removing |
Let's see what crater finds anyway. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1642e7c
to
09fbf38
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
095877a
to
36f6542
Compare
Removed the |
@bors r+ |
📌 Commit 36f6542 has been approved by |
Remove `ObsoleteInPlace` The in place syntax has been deprecated for over a year. As it is, this is accumulated cruft: the error messages are unlikely to be helpful any more and it conflicts with some useful syntax (e.g. const generics in some instances). It may be that removing `Token::LArrow` is backwards-incompatible. We should do a crater run to check. cc @eddyb
☀️ Test successful - checks-travis, status-appveyor |
rustup rust-lang/rust#60803 changelog: none
Changes: ```` Rustup to rust-lang#61026 rustup rust-lang#60803 Rustup to rust-lang#59545 Rustup to rust-lang#60965 clippy: bump rustc_tools util version to 0.2 rustc_tools_util: fix typo in docs (readme) rustc_tool_utils: bump version to 0.2.0 update if_chain to 1.0.0 tests: update needless_bool test stderr cargo fmt Rustup to rust-lang#60740 Lifetimes UI test cleanup ````
help: if you meant to write a comparison against a negative value, add a space in between `<` and `-` | ||
| | ||
LL | if x< -1 { | ||
| ^^^ |
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.
It is a shame that we lost this suggestion...
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.
Added #62632 to track this.
The in place syntax has been deprecated for over a year. As it is, this is accumulated cruft: the error messages are unlikely to be helpful any more and it conflicts with some useful syntax (e.g. const generics in some instances).
It may be that removing
Token::LArrow
is backwards-incompatible. We should do a crater run to check.cc @eddyb