Skip to content
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

Confusing term for loop labels in reference doc #17716

Closed
jgallagher opened this issue Oct 2, 2014 · 3 comments
Closed

Confusing term for loop labels in reference doc #17716

jgallagher opened this issue Oct 2, 2014 · 3 comments

Comments

@jgallagher
Copy link

The grammar in the reference for loop (http://doc.rust-lang.org/reference.html#infinite-loops) uses the word "lifetime" to describe the label, but given that "lifetime" is term that means something very different, it's a little confusing.

Additionally, judging by https://github.com/rust-lang/rust/blob/master/src/libsyntax/parse/parser.rs#L2162-L2176, for loops and while loops also support labels, but that isn't mentioned for them.

@steveklabnik steveklabnik added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-docs and removed T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Oct 2, 2014
@steveklabnik
Copy link
Member

This is usually called a lifetime, but yeah, maybe that's not the best name.

@jgallagher
Copy link
Author

Yeah, I just noticed that the parser function is called token_if_lifetime, but "git grep lifetime" shows a lot more usage of "lifetime" in terms of the borrow checker.

@steveklabnik
Copy link
Member

Given that this name is currently the correct one, I'm giving this a close. If we have a specific way to improve this, we can entertain the notion, but right now, that's the name.

lnicola pushed a commit to lnicola/rust that referenced this issue Aug 29, 2024
…Veykril

assist: Add new assist toggle_macro_delimiter

Closes rust-lang#17716
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants