Uh oh!
There was an error while loading. Please reload this page.
Update E0463 error message to new format - #36060
Conversation
rust-highfive
commented
Aug 28, 2016
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jonathandturner (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. |
There was a problem hiding this comment.
Rather than setting err_msg and using it later, you could instead set the label in the same condition. Maybe something like:
letmut err = struct_span_err!(self.sess,self.span,E0463,"can't find crate for `{}`{}",self.ident, add);
err.span_label(self.span,&format!("can't find crate"));
errsophiajt
commented
Aug 28, 2016
@paulfanelli - looks close. I added a comment of a way to tighten up the code. |
paulfanelli
commented
Aug 29, 2016
Oh man, I originally tried to code it that way, but I made a mistake, got a compiler error (it said there was a type mismatch between the if and else blocks) and thought that I couldn't code it that way. I tried your change -- and it works! Very nice. Definitely, learned a bunch of stuff from this one. Thx. |
paulfanelli
commented
Aug 29, 2016
I've updated the PR... |
36fc4b6 to
1b15ba3Comparesophiajt
commented
Aug 29, 2016
Yeah, that looks a lot better. I think we're almost there. One last thing - can you squash your two commits down to one? With that I think we're ready. |
1b15ba3 to
58ced16Comparepaulfanelli
commented
Aug 29, 2016
Ok, I've squashed them together...and updated this PR. |
sophiajt
commented
Aug 29, 2016
Great, thanks. @bors r+ rollup |
bors
commented
Aug 29, 2016
📌 Commit 58ced16 has been approved by |
… r=jonathandturner Update E0463 error message to new format Fixesrust-lang#35934 as part of rust-lang#35233 r? @jonathandturner
… r=jonathandturner Update E0463 error message to new format Fixesrust-lang#35934 as part of rust-lang#35233 r? @jonathandturner
… r=jonathandturner Update E0463 error message to new format Fixesrust-lang#35934 as part of rust-lang#35233 r? @jonathandturner
Fixes#35934 as part of #35233
r? @jonathandturner