Uh oh!
There was an error while loading. Please reload this page.
Recover on const impl<> X for Y - #79668
Conversation
rust-highfive
commented
Dec 3, 2020
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
coolreader18
commented
Dec 3, 2020
I switched to using |
b375743 to
fddb520CompareUh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Could you move this code to a separate function in parser/diagnostics.rs?
That's where diagnostic or recovery code lives, so it's separated from the "reference parser" code describing the language.
There was a problem hiding this comment.
Oh I only just realized that you asked to move it to diagnostics.rs; I just moved it under recover_const_mut which is still in parser/item.rs, there's other recover_* functions there as well.
There was a problem hiding this comment.
parser/item.rs, there's otherrecover_*functions there as well.
(The other function will also need to move to diagnostics.rs, but not in this PR.)
petrochenkov
commented
Dec 12, 2020
Could you also squash commits into one after making all the changes? |
c7dd5ff to
ede6bd5Compareede6bd5 to
1e27b65Comparecoolreader18
commented
Dec 12, 2020
Alrighty, squashed. |
petrochenkov
commented
Dec 12, 2020
Thanks! |
bors
commented
Dec 12, 2020
📌 Commit 1e27b65 has been approved by |
bors
commented
Dec 13, 2020
⌛ Testing commit 1e27b65 with merge a428dd84d4e3cb80da7a395a0a047b1adf52677d... |
bors
commented
Dec 13, 2020
💔 Test failed - checks-actions |
petrochenkov
commented
Dec 13, 2020
Looks spurious. |
bors
commented
Dec 13, 2020
bors
commented
Dec 13, 2020
☀️ Test successful - checks-actions |
@leonardo-m mentioned that
const impl Foo for Barcould be recovered from in #79287.I'm not sure about the error strings as they are, I think it should probably be something like the error that
expected_one_of_not_foundmakes + the suggestion to flip the keywords, but I'm not sure how exactly to do that. Also, I decided not to try to handleconst unsafe implorunsafe const implcause I figured thatunsafe impl constwould be pretty rare anyway (if it's even valid?), and it wouldn't be worth making the code more messy.