-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Clarify first use of "elide" in lifetime.md #28842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pcwalton (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. |
"elide" is standard community terminology for this family of behaviours, fwiw. I think in this case, this is an improvement though. @bors r+ rollup |
📌 Commit ac49eca has been approved by |
@bors: r- |
So: I do agree that 'elide' is a weird word, but we also call it "lifetime elision" everywhere, and so, in some sense, using this word aids discover-ability. So I'd like to talk about it before we merge. I'm not sure what the right path of action here is, exactly. |
I would add a parenthetical mentioning the concept of "elision" here if that's really desirable. I'd need to go over this section more to get the context, but I was under the impression that this was at a point where we're "not even ready" to discuss lifetime elision in earnest. |
That sounds like a reasonable idea. I think it makes sense to at least clarify the use of "elide", even if that just involves including something like "(see 'Lifetime Elision' below)" to the sentence. |
👍 to both things. I think a forward reference here is just fine. Maybe something like
? |
👍 to that idea. |
Great! Amend this PR and we can |
|
@@ -70,9 +70,11 @@ fn bar<'a>(x: &'a i32) { | |||
``` | |||
|
|||
The `'a` reads ‘the lifetime a’. Technically, every reference has some lifetime | |||
associated with it, but the compiler lets you elide them in common cases. | |||
associated with it, but the compiler lets you elide (i.e. omit, see ["Lifetime Elision"][lifetime-elision] below) them in common cases. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you wrap this to 80 chars please?
@bors: r+ rollup |
📌 Commit f490f51 has been approved by |
🌈 |
…ision_link, r=alexcrichton This link was added in rust-lang#28842 but doesn't work at https://doc.rust-lang.org/nightly/book/lifetimes.html. What works in my markdown preview doesn't work live, and vice versa.
No description provided.