Uh oh!
There was an error while loading. Please reload this page.
Error message for E0307 is weird #26485 - #26778
Conversation
rust-highfive
commented
Jul 4, 2015
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pnkfelix (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. 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. |
pnkfelix
commented
Jul 17, 2015
Our standard convention for our error messages is to say "expected XXX, found YYY", but your PR is in this case emitting "found YYY, expected XXX" I am not 100% clear on what your objection is to the error message as it was originally formed.
Also, did you run |
jawline
commented
Jul 17, 2015
Hi, Sorry I wasn't sure about the convention. The issue I have with the print out is that the compiler is printing the details of an error in the found which can lead to strange error messages like a.rs:8:17: 8:38 error: expected constant integer for repeat count, but unsupported constant expr [E0307] or any of the possible errors in const_eval.rs ConstEvalError::description The error text just seems a little bit incorrect grammar wise this way around - but if it goes against the convention perhaps it should just be left this way around. |
jawline
commented
Jul 17, 2015
Haven't run make check - defiantly should. Woops |
pnkfelix
commented
Jul 17, 2015
@jawline maybe simplest to try to get the output to look like "error: expected constant integer for repeat count, but found unsupported constant expr" instead? alternatively, we could try to just emit "unsupported const expr" alone (without saying anything about "expected constant integer") for just that case, and leave the other cases alone? |
jawline
commented
Jul 17, 2015
Sure - I was trying to avoid logic just for this case, but I think adding the 'found' when the error kind is MiscCatchAll might be best. |
jawline
commented
Jul 19, 2015
Modified so the error now reads src/lib.rs:20:15: 20:23 help: run only for unsupport constant expr make check reports |
pnkfelix
commented
Jul 20, 2015
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
bors
commented
Jul 22, 2015
☔ The latest upstream changes (presumably #26683) made this pull request unmergeable. Please resolve the merge conflicts. |
jawline
commented
Jul 23, 2015
Not entirely sure why Travis is failing in LLVM - haven't touched it. Builds on my machine |
Gankra
commented
Jul 23, 2015
You accidentally commited submodule changes. |
apasel422
commented
Jul 23, 2015
One of these commits should probably have "closes #26485" in it (they could all be squashed, too). |
pnkfelix
commented
Jul 23, 2015
@bors r+ 26e961f rollup |
Gankra
commented
Jul 23, 2015
@pnkfelix presumably this should be squashed? (more commits than lines changed...) |
pnkfelix
commented
Jul 24, 2015
@gankro yeah you're right; I was trying to avoid spending even more time on this than I already had (with back-and-forth regarding squashing and re-r-plus'ing) but obviously now I've lost more time than I saved. |
pnkfelix
commented
Jul 24, 2015
@bors r- |
pnkfelix
commented
Jul 24, 2015
@jawline please squash. (r=me after said squashing...) |
jawline
commented
Jul 25, 2015
Hi guys,Sorry I missed the comment about squashing before. I'm having trouble squashing because of the merge conflict solved after. rebase -p -i doesn't seem to work properly because of it, any idea what I need to do to squash it without screwing up the history in this case? |
apasel422
commented
Jul 27, 2015
@jawline With your original commits, you should rebase onto master, then squash them. |
jawline
commented
Jul 28, 2015
@pnkfelix Hi, Sorry for the delay. Squashed most of the commits and added closes |
apasel422
commented
Jul 28, 2015
@jawline It should be possible to get this down to one commit with no merges. |
pnkfelix
commented
Jul 28, 2015
@jawline yes, please rebase to a single commit as requested by @apasel422 (if you need assistance, feel free to ping me on irc and I can try to help) |
jawline
commented
Jul 29, 2015
@pnkfelix Sorry I was a bit of an idiot and missed those. done |
pnkfelix
commented
Jul 29, 2015
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression
Print the error message and then what is expected by the repeat count so the output makes more sense when there is an error in the const expression