Uh oh!
There was an error while loading. Please reload this page.
Suggest borrowing when it would satisfy an unmet trait bound - #65456
Conversation
rust-highfive
commented
Oct 16, 2019
(rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
This is the particular common case (std::str::pattern::Pattern) that is encountered often by newcomers and this PR is meant to solve.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
99bf5dc to
dc00b1aCompare
This comment has been minimized.
This comment has been minimized.
Uh oh!
There was an error while loading. Please reload this page.
dc00b1a to
6f0731eCompareestebank
commented
Oct 31, 2019
CC @Centril in case you're interested in this. |
Centril
commented
Oct 31, 2019
.stderr diffs look good but the code is alien to me :) |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
This comment has been minimized.
This comment has been minimized.
6f0731e to
001295bCompareestebank
commented
Nov 7, 2019
ping @matthewjasper |
matthewjasper
commented
Nov 7, 2019
@bors r+ |
bors
commented
Nov 7, 2019
📌 Commit 001295beefad4b250b2d940fc1e023d1894bad18 has been approved by |
This comment has been minimized.
This comment has been minimized.
8970e3a to
85d7ff6Compareestebank
commented
Nov 14, 2019
@bors r=matthewjasper |
bors
commented
Nov 14, 2019
📌 Commit 85d7ff6 has been approved by |
85d7ff6 to
e5e3c52Compareestebank
commented
Nov 16, 2019
@bors r=matthewjasper |
bors
commented
Nov 16, 2019
📌 Commit e5e3c52e9e6561ff33184b4fe17adc2dbc071fe4 has been approved by |
bors
commented
Nov 16, 2019
☔ The latest upstream changes (presumably #66453) made this pull request unmergeable. Please resolve the merge conflicts. |
estebank
commented
Nov 16, 2019
@bors r- |
When there are multiple implementors for the same trait that is present in an unmet binding, modify the E0277 error to refer to the parent obligation and verify whether borrowing the argument being passed in would satisfy the unmet bound. If it would, suggest it.
e5e3c52 to
5c5cbc0Compare
This comment has been minimized.
This comment has been minimized.
5c5cbc0 to
2fe8371Compareestebank
commented
Nov 17, 2019
@bors r=matthewjasper |
bors
commented
Nov 17, 2019
📌 Commit 2fe8371 has been approved by |
bors
commented
Nov 18, 2019
Suggest borrowing when it would satisfy an unmet trait bound When there are multiple implementors for the same trait that is present in an unmet binding, modify the E0277 error to refer to the parent obligation and verify whether borrowing the argument being passed in would satisfy the unmet bound. If it would, suggest it. Fix#56368.
bors
commented
Nov 18, 2019
☀️ Test successful - checks-azure |
rust-highfive
commented
Nov 18, 2019
Tested on commit rust-lang/rust@361791b. Direct link to PR: <rust-lang/rust#65456> 🎉 rustc-guide on linux: test-fail → test-pass (cc @amanjeev@spastorino@mark-i-m, @rust-lang/infra).


When there are multiple implementors for the same trait that is present
in an unmet binding, modify the E0277 error to refer to the parent
obligation and verify whether borrowing the argument being passed in
would satisfy the unmet bound. If it would, suggest it.
Fix#56368.