-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Update Rhs on ShlAssign to default to Self #49630
Conversation
@rust-lang/libs This seems fine to me if it is consistent with other traits. Are there any backwards compatibility concerns to worry about here? (I don't think so?) |
Oh dear this definitely looks like an oversight! I can't think of any back-compat concerns but since this is a widely used trait I think we could benefit from crater @bors: try @rust-lang/release could a crater run be scheduled for this PR? |
⌛ Trying commit 37464a0a7d53cc22b4345d5b8a6773810fc0a38e with merge 4846fb5a35cbaeaa1107a3550cbfde95362b47c3... |
☀️ Test successful - status-travis |
I honestly would have suggested to default to |
It looks like we aren't missing any other instances of this oversight:
For reference, this is before my patch:
|
I believe we currently guarantee that adding a default doesn't break anything. |
@npmccallum |
Operator traits seem to be inconsistent regarding the right hand side generic. Most default Rhs/RHS to Self, but a few omit this. This patch modifies them all to default to Self. This should not have any backwards compatibility issues because we are only enabling code that previously wouldn't compile.
@clarcharr I pushed a new version of the patch which fixes Please also see this related issue: rust-lang/libc#964 |
After the above patches (including libc), we get these results:
The only case we haven't handled that I can see is the one in |
Crater has started. ETA is ~5 days. |
Crater results are at: http://cargobomb-reports.s3.amazonaws.com/pr-49630/index.html. 'Blacklisted' crates (spurious failures etc) can be found here. If you see any spurious failures not on the list, please make a PR against that file. (interested observers: Crater is a tool for testing the impact of changes on the crates.io ecosystem. You can find out more at the repo if you're curious) |
I'm new at this, but the failure don't appear to me to be related to this patch set. |
Yep those do indeed look spurious, so I think this is good to go! @bors: r+ |
📌 Commit 587098a has been approved by |
Update Rhs on ShlAssign to default to Self This matches the behavior on ShrAssign and all other *Assign operations.
☀️ Test successful - status-appveyor, status-travis |
This matches the behavior on ShrAssign and all other *Assign operations.