Blame SOURCES/0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch

c3bb10
From f200c1e7afdd04b42c01c0108735e5b14ca07d93 Mon Sep 17 00:00:00 2001
c3bb10
From: Josh Stone <jistone@redhat.com>
c3bb10
Date: Fri, 9 Oct 2020 20:12:26 -0700
c3bb10
Subject: [PATCH] doc: disambiguate stat in MetadataExt::as_raw_stat
c3bb10
c3bb10
A few architectures in `os::linux::raw` import `libc::stat`, rather than
c3bb10
defining that type directly. However, that also imports the _function_
c3bb10
called `stat`, which makes this doc link ambiguous:
c3bb10
c3bb10
    error: `crate::os::linux::raw::stat` is both a struct and a function
c3bb10
      --> library/std/src/os/linux/fs.rs:21:19
c3bb10
       |
c3bb10
    21 |     /// [`stat`]: crate::os::linux::raw::stat
c3bb10
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^ ambiguous link
c3bb10
       |
c3bb10
       = note: `-D broken-intra-doc-links` implied by `-D warnings`
c3bb10
    help: to link to the struct, prefix with the item type
c3bb10
       |
c3bb10
    21 |     /// [`stat`]: struct@crate::os::linux::raw::stat
c3bb10
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
c3bb10
    help: to link to the function, add parentheses
c3bb10
       |
c3bb10
    21 |     /// [`stat`]: crate::os::linux::raw::stat()
c3bb10
       |                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
c3bb10
c3bb10
We want the `struct`, so it's now prefixed accordingly.
c3bb10
---
c3bb10
 library/std/src/os/linux/fs.rs | 2 +-
c3bb10
 1 file changed, 1 insertion(+), 1 deletion(-)
c3bb10
c3bb10
diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
c3bb10
index ff23c3d67e3b..9b7af97616c9 100644
c3bb10
--- a/library/std/src/os/linux/fs.rs
c3bb10
+++ b/library/std/src/os/linux/fs.rs
c3bb10
@@ -20,7 +20,7 @@ pub trait MetadataExt {
c3bb10
     /// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
c3bb10
     /// cross-Unix abstractions contained within the raw stat.
c3bb10
     ///
c3bb10
-    /// [`stat`]: crate::os::linux::raw::stat
c3bb10
+    /// [`stat`]: struct@crate::os::linux::raw::stat
c3bb10
     ///
c3bb10
     /// # Examples
c3bb10
     ///
c3bb10
-- 
c3bb10
2.26.2
c3bb10