Document the recursion_limit built-in attribute - #162369
Conversation
|
Thanks for the pull request, and welcome! The Rust Project has assigned @JohnTitor (or someone else) to review your changes, you should hear from them (or someone else) within the next two weeks. Please see the contribution instructions and our LLM policy for more information. Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
9f9f9fa to
b0d3fe7
Compare
|
Personal drive-by suggestions: While the docs do introduce "compile-time operations" explicitly, I suggest to go one step further add a clarifying sentence wrt not having anything to do with run-time recursion; people have confused the attribute to affect recursive code, which it does not. Also I suggest to explicitly advise readers to increase the limit in measured steps instead of just punching in |
Adds an entry for `recursion_limit` to `library/core/src/attribute_docs.rs` using `#[doc(attribute = "...")]`.
b0d3fe7 to
8576dc3
Compare
Good points, thanks. I added a clarifying sentence that the limit is compile-time only and has no effect on runtime recursion, and I explicitly advise raising it in measured steps instead of jumping to a very large number. |
Document the
recursion_limitbuilt-in attribute in std via#[doc(attribute = "recursion_limit")], covering:As claimed in #157604 (comment).
Part of #157604.