-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
add missing 'static lifetime in docs #66465
add missing 'static lifetime in docs #66465
Conversation
The example refers to a static lifetime parameter that can be elided. This parameter is not included, meaning lifetime elision is not shown.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @rkruppe (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. |
Thanks for the PR! Just to avoid misunderstandings, could you say a bit about why you want to add the lifetime annotation? It isn't necessary to make this correct Rust (in |
The docs explains what can be constants, including |
https://doc.rust-lang.org/std/keyword.const.html is confusing as it refers to an explicit lifetime that is not visible in the docs ( |
Oh, I see, that makes a lot of sense. Thanks! @bors r+ rollup |
📌 Commit e85f40c has been approved by |
…hown, r=rkruppe add missing 'static lifetime in docs
…hown, r=rkruppe add missing 'static lifetime in docs
Rollup of 11 pull requests Successful merges: - #65739 (Improve documentation of `Vec::split_off(...)`) - #66271 (syntax: Keep string literals in ABIs and `asm!` more precisely) - #66344 (rustc_plugin: Remove `Registry::register_attribute`) - #66381 (find_deprecation: deprecation attr may be ill-formed meta.) - #66395 (Centralize panic macro documentation) - #66456 (Move `DIAGNOSTICS` usage to `rustc_driver`) - #66465 (add missing 'static lifetime in docs) - #66466 (miri panic_unwind: fix hack for SEH platforms) - #66469 (Use "field is never read" instead of "field is never used") - #66471 (Add test for issue 63116) - #66477 (Clarify transmute_copy documentation example) Failed merges: r? @ghost
No description provided.