-
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
Use env::func()
, not 'the function env::func' in docs for std::env
#75945
Conversation
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 do wonder whether this makes the docs a little harder to read ... it's idiomatic to use env::var
and not var
for example. @poliorcetics , what do you think?
@jyn514 Nice idea, I haven't thought about this since I was focused on clearing things up. Clear! Go, go, go... |
I think A tentative plus for |
@poliorcetics I think it is better to write stuff that was in the module path so that it is easier to understand from users perspective, so the relative path is understandable there user already know the context when browsing the same page. |
After looking at the docs I must say I personally prefer the |
@pickfire do you mind changing this to use |
Don't I need to add |
Other way around, you need to add
I think we should optimize for readers of the HTML first and of the markdown second. Adding the link is not a giant burden, there are already hundreds of links in libstd, and IMO it makes the HTML a lot more clear. |
Why not add the module implicitly since most rust imports consists of |
Okay, we can leave it aside. @jyn514 how do you think we should proceed with this patch? |
I think if you change |
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 squash the commits? r=me with that done and nit addressed
How do I squash the commits on the web? I feel like opening another pull request is easier. Hehe |
I'm not aware that you can. I recommend using git locally: |
I do know how do do it, just feel lazy to do since I need to delete the branch later on. Anyway, I did it already. |
Now you need to squash again 😆 |
vars() rather than vars function Co-authored-by: Joshua Nelson <[email protected]> Use [xxx()] rather than the [xxx] function Co-authored-by: Joshua Nelson <[email protected]> Env text representation of function intra-doc link Suggested by @jyn514 Link join_paths in env doc for parity Change xxx to env::xxx for lib env doc Add link requsted by @jyn514 Fix doc build with same link Co-authored-by: Joshua Nelson <[email protected]> Fix missing intra-doc link Fix added whitespace in doc Co-authored-by: Joshua Nelson <[email protected]> Add brackets for `join_paths` Co-authored-by: Joshua Nelson <[email protected]> Use unused link join_paths Removed same link for join_paths Co-authored-by: Joshua Nelson <[email protected]> Remove unsed link join_paths
@bors r+ rollup |
📌 Commit 1d017eb has been approved by |
env::func()
, not 'the function env::func' in docs for std::env
Rollup of 12 pull requests Successful merges: - rust-lang#75945 (Use `env::func()`, not 'the function env::func' in docs for std::env) - rust-lang#76002 (Fix `-Z instrument-coverage` on MSVC) - rust-lang#76003 (Adds two source span utility functions used in source-based coverage) - rust-lang#76059 (Clean up E0764) - rust-lang#76103 (Clean up E0769) - rust-lang#76139 (Make `cow_is_borrowed` methods const) - rust-lang#76154 (Fix rustdoc strings indentation) - rust-lang#76161 (Remove notrust in rustc_middle) - rust-lang#76163 (README: Adjust Linux and macOS support platform and architecture) - rust-lang#76166 (Make `StringReader` private) - rust-lang#76172 (Revert rust-lang#75463) - rust-lang#76178 (Update expect-test to 1.0) Failed merges: r? @ghost
Follow up of #75629
r? @jyn514