-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Fix old docs #41264
Fix old docs #41264
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @frewsxcv (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. |
src/libsyntax/parse/parser.rs
Outdated
@@ -4107,7 +4107,7 @@ impl<'a> Parser<'a> { | |||
self.parse_ty_param_bounds_common(true) | |||
} | |||
|
|||
// Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`. | |||
// Parse bounds of a type parameter `BOUND + BOUND + BOUND`. |
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.
type parameter -> lifetime parameter
I'd also write "possibly with trailing +
" to avoid future questions for sure.
src/doc/grammar.md
Outdated
lt_bound := lifetime | ||
ty_bound := [?] [ for<lt_param_defs> ] simple_path | ||
``` | ||
|
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.
Could you also remove the bound grammar from ### Closure types
and move the bound-list
grammar into this paragraph (adjusting it with optional trailing +
).
/cc @rust-lang/compiler or @rust-lang/lang ? |
Seems not wrong to me. |
Do I hear an r? @nikomatsakis @steveklabnik @petrochenkov ? |
src/libsyntax/parse/parser.rs
Outdated
@@ -4066,7 +4066,7 @@ impl<'a> Parser<'a> { | |||
}).emit(); | |||
} | |||
|
|||
// Parse bounds of a type parameter `BOUND + BOUND + BOUND` without trailing `+`. | |||
// Parse bounds of a lifetime parameter `BOUND + BOUND + BOUND`, possibly with trailing `+`. |
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.
"lifetime parameter" -> "type parameter", otherwise r=me
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.
I didn't notice this PR was updated, sorry.
@bors: r+ rollup thank you! |
📌 Commit 08a955a has been approved by |
☀️ Test successful - status-appveyor, status-travis |
Fixes #41158