Uh oh!
There was an error while loading. Please reload this page.
Remove 'elided' from lifetime resolution error - #42415
Conversation
Removes 'elided' from lifetime resolution errors Removes 'elided' from relevant error messaging tests
rust-highfive
commented
Jun 3, 2017
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Mark-Simulacrum (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. |
| fn f(a: &S, b: i32) -> &i32 { | ||
| //~^ ERROR missing lifetime specifier [E0106] | ||
| //~^^ HELP does not say which one of `a`'s 2 elided lifetimes it is borrowed from | ||
| //~^^ HELP does not say which one of `a`'s 2 lifetimes it is borrowed from |
There was a problem hiding this comment.
in my opinion, in this instance, the help message is clearer here with the word 'elided'
There was a problem hiding this comment.
Yeah, I'm not sure if we can detect this case though.
Mark-Simulacrum
commented
Jun 4, 2017
cc @estebank, you've worked with diagnostics quite a bit -- do you think removing elided is the best approach here or should we try to put more code in to deal with more cases? |
arielb1
commented
Jun 4, 2017
@bors r+ rollup @nikomatsakis is trying to change how elision works, but this should work for now. |
bors
commented
Jun 4, 2017
📌 Commit 7ed771f has been approved by |
estebank
commented
Jun 4, 2017
@Mark-Simulacrum, I believe we don't track elided lifetimes, which would make for a much bigger PR in order to track that (I might be wrong about this though). I'm ok with this change (and it's been already +1'd) as long as we keep a ticket around to expand on this in the future. For example, in the cases presented in the original ticket, it should mention |
Remove 'elided' from lifetime resolution error Removes 'elided' from lifetime resolution errors Removes 'elided' from relevant error messaging tests This PR resolvesrust-lang#29094 r? @Mark-Simulacrum
Remove 'elided' from lifetime resolution error Removes 'elided' from lifetime resolution errors Removes 'elided' from relevant error messaging tests This PR resolvesrust-lang#29094 r? @Mark-Simulacrum
Removes 'elided' from lifetime resolution errors
Removes 'elided' from relevant error messaging tests
This PR resolves#29094
r? @Mark-Simulacrum