-
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
doc: disambiguate stat in MetadataExt::as_raw_stat #77777
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A few architectures in `os::linux::raw` import `libc::stat`, rather than defining that type directly. However, that also imports the _function_ called `stat`, which makes this doc link ambiguous: error: `crate::os::linux::raw::stat` is both a struct and a function --> library/std/src/os/linux/fs.rs:21:19 | 21 | /// [`stat`]: crate::os::linux::raw::stat | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous link | = note: `-D broken-intra-doc-links` implied by `-D warnings` help: to link to the struct, prefix with the item type | 21 | /// [`stat`]: struct@crate::os::linux::raw::stat | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to link to the function, add parentheses | 21 | /// [`stat`]: crate::os::linux::raw::stat() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ We want the `struct`, so it's now prefixed accordingly.
r? @shepmaster (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Oct 10, 2020
@bors r+ rollup |
📌 Commit f200c1e has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Oct 10, 2020
JohnTitor
added a commit
to JohnTitor/rust
that referenced
this pull request
Oct 10, 2020
doc: disambiguate stat in MetadataExt::as_raw_stat A few architectures in `os::linux::raw` import `libc::stat`, rather than defining that type directly. However, that also imports the _function_ called `stat`, which makes this doc link ambiguous: error: `crate::os::linux::raw::stat` is both a struct and a function --> library/std/src/os/linux/fs.rs:21:19 | 21 | /// [`stat`]: crate::os::linux::raw::stat | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous link | = note: `-D broken-intra-doc-links` implied by `-D warnings` help: to link to the struct, prefix with the item type | 21 | /// [`stat`]: struct@crate::os::linux::raw::stat | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: to link to the function, add parentheses | 21 | /// [`stat`]: crate::os::linux::raw::stat() | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ We want the `struct`, so it's now prefixed accordingly.
What a beautiful issue number. |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Oct 10, 2020
Rollup of 10 pull requests Successful merges: - rust-lang#77195 (Link to documentation-specific guidelines.) - rust-lang#77629 (Cleanup of `eat_while()` in lexer) - rust-lang#77709 (Link Vec leak doc to Box) - rust-lang#77738 (fix __rust_alloc_error_handler comment) - rust-lang#77748 (Dead code cleanup in windows-gnu std) - rust-lang#77754 (Add TraitDef::find_map_relevant_impl) - rust-lang#77766 (Clarify the debug-related values should take boolean) - rust-lang#77777 (doc: disambiguate stat in MetadataExt::as_raw_stat) - rust-lang#77782 (Fix typo in error code description) - rust-lang#77787 (Update `changelog-seen` in config.toml.example) Failed merges: r? `@ghost`
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
A few architectures in
os::linux::raw
importlibc::stat
, rather thandefining that type directly. However, that also imports the function
called
stat
, which makes this doc link ambiguous:We want the
struct
, so it's now prefixed accordingly.