Skip to content

Commit 5f9ffb9

Browse files
authored
Rollup merge of #71470 - TyPR124:fix-doc-links, r=jonas-schievink
Fix doc links This fixes a few doc links which were causing `cargo doc` to fail when using `--document-private-items --document-hidden-items` on libstd. Most of the fixes are just escaping '[' and ']' characters in doc comments, and one change actually fixes a doc link.
2 parents 199f4de + 0ad9a4d commit 5f9ffb9

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/liballoc/collections/vec_deque.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ pub struct VecDeque<T> {
7373
/// It produces the following sequence of matching slices:
7474
///
7575
/// ([0 1], [a b])
76-
/// ([2], [c])
76+
/// (\[2\], \[c\])
7777
/// ([3 4], [d e])
7878
///
7979
/// and the uneven remainder of either A or B is skipped.

src/liballoc/rc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1024,7 +1024,7 @@ unsafe fn set_data_ptr<T: ?Sized, U>(mut ptr: *mut T, data: *mut U) -> *mut T {
10241024
}
10251025

10261026
impl<T> Rc<[T]> {
1027-
/// Copy elements from slice into newly allocated Rc<[T]>
1027+
/// Copy elements from slice into newly allocated Rc<\[T\]>
10281028
///
10291029
/// Unsafe because the caller must either take ownership or bind `T: Copy`
10301030
unsafe fn copy_from_slice(v: &[T]) -> Rc<[T]> {

src/liballoc/sync.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -902,7 +902,7 @@ unsafe fn set_data_ptr<T: ?Sized, U>(mut ptr: *mut T, data: *mut U) -> *mut T {
902902
}
903903

904904
impl<T> Arc<[T]> {
905-
/// Copy elements from slice into newly allocated Arc<[T]>
905+
/// Copy elements from slice into newly allocated Arc<\[T\]>
906906
///
907907
/// Unsafe because the caller must either take ownership or bind `T: Copy`.
908908
unsafe fn copy_from_slice(v: &[T]) -> Arc<[T]> {

src/libcore/ffi.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ impl<'a, 'f: 'a> DerefMut for VaList<'a, 'f> {
282282
mod sealed_trait {
283283
/// Trait which whitelists the allowed types to be used with [VaList::arg]
284284
///
285-
/// [VaList::va_arg]: struct.VaList.html#method.arg
285+
/// [VaList::arg]: ../struct.VaList.html#method.arg
286286
#[unstable(
287287
feature = "c_variadic",
288288
reason = "the `c_variadic` feature has not been properly tested on \

0 commit comments

Comments
 (0)