Fix the doc link to raw::stat on s390x
This commit is contained in:
parent
aac4471f40
commit
51a2a836f9
46
0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch
Normal file
46
0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch
Normal file
@ -0,0 +1,46 @@
|
||||
From f200c1e7afdd04b42c01c0108735e5b14ca07d93 Mon Sep 17 00:00:00 2001
|
||||
From: Josh Stone <jistone@redhat.com>
|
||||
Date: Fri, 9 Oct 2020 20:12:26 -0700
|
||||
Subject: [PATCH] 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.
|
||||
---
|
||||
library/std/src/os/linux/fs.rs | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/library/std/src/os/linux/fs.rs b/library/std/src/os/linux/fs.rs
|
||||
index ff23c3d67e3b..9b7af97616c9 100644
|
||||
--- a/library/std/src/os/linux/fs.rs
|
||||
+++ b/library/std/src/os/linux/fs.rs
|
||||
@@ -20,7 +20,7 @@ pub trait MetadataExt {
|
||||
/// Unix platforms. The `os::unix::fs::MetadataExt` trait contains the
|
||||
/// cross-Unix abstractions contained within the raw stat.
|
||||
///
|
||||
- /// [`stat`]: crate::os::linux::raw::stat
|
||||
+ /// [`stat`]: struct@crate::os::linux::raw::stat
|
||||
///
|
||||
/// # Examples
|
||||
///
|
||||
--
|
||||
2.26.2
|
||||
|
@ -70,6 +70,9 @@ Source0: https://static.rust-lang.org/dist/%{rustc_package}.tar.xz
|
||||
# https://github.com/rust-lang/backtrace-rs/pull/373
|
||||
Patch1: 0001-use-NativeEndian-in-symbolize-gimli-Context.patch
|
||||
|
||||
# https://github.com/rust-lang/rust/pull/77777
|
||||
Patch2: 0001-doc-disambiguate-stat-in-MetadataExt-as_raw_stat.patch
|
||||
|
||||
### RHEL-specific patches below ###
|
||||
|
||||
# Disable cargo->libgit2->libssh2 on RHEL, as it's not approved for FIPS (rhbz1732949)
|
||||
@ -406,6 +409,7 @@ test -f '%{local_rust_root}/bin/rustc'
|
||||
%setup -q -n %{rustc_package}
|
||||
|
||||
%patch1 -p1 -d library/backtrace
|
||||
%patch2 -p1
|
||||
|
||||
%if %with disabled_libssh2
|
||||
%patch100 -p1
|
||||
|
Loading…
Reference in New Issue
Block a user