From 55f9c611b277c31e9db21a718c390b9ef9d76959 Mon Sep 17 00:00:00 2001 From: Peter Limkilde Svendsen Date: Thu, 2 Apr 2026 00:43:20 +0200 Subject: [PATCH] Fix most rustdoc warnings --- src/header/dlfcn/mod.rs | 2 +- src/header/err/mod.rs | 2 +- src/header/stdio/getdelim.rs | 4 ++-- src/header/stdlib/rand48.rs | 2 +- src/header/stdlib/random.rs | 2 +- src/header/sys_time/mod.rs | 2 +- src/io/buffered.rs | 4 ++-- src/ld_so/tcb.rs | 2 +- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/header/dlfcn/mod.rs b/src/header/dlfcn/mod.rs index 7bcc3c6535..923c057169 100644 --- a/src/header/dlfcn/mod.rs +++ b/src/header/dlfcn/mod.rs @@ -48,7 +48,7 @@ pub struct Dl_info_t { dli_saddr: *mut c_void, } -/// alias as per spec update: https://www.austingroupbugs.net/view.php?id=1847 +/// alias as per spec update: pub type Dl_info = Dl_info_t; /// See . diff --git a/src/header/err/mod.rs b/src/header/err/mod.rs index 28c9f9441f..5e47ee4e7c 100644 --- a/src/header/err/mod.rs +++ b/src/header/err/mod.rs @@ -8,7 +8,7 @@ //! and `musl`. //! //! The functions come in sets of three. Each of them print the program binary name (the last path -//! segment of arg[0]) and an optional user message along with these differences: +//! segment of `argv[0]`) and an optional user message along with these differences: //! * No suffix: Prints an error message for ERRNO based on [`strerror`] //! * `c` suffix: Prints an error message for an arbitrary error code //! * `x` suffix: Does not print an error code diff --git a/src/header/stdio/getdelim.rs b/src/header/stdio/getdelim.rs index 60d59abbd0..145aa25b31 100644 --- a/src/header/stdio/getdelim.rs +++ b/src/header/stdio/getdelim.rs @@ -1,4 +1,4 @@ -// https://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html +// See . use alloc::vec::Vec; use core::{intrinsics::unlikely, ptr}; @@ -31,7 +31,7 @@ pub unsafe extern "C" fn getline( // One *could* read the standard as 'getdelim sets the stream error flag on *any* error, though // since glibc doesn't seem to do this, I won't either -/// https://pubs.opengroup.org/onlinepubs/9699919799/functions/getline.html +/// /// /// # Safety /// - `lineptr, *lineptr, `n`, `stream` pointers must be valid and have to be aligned. diff --git a/src/header/stdlib/rand48.rs b/src/header/stdlib/rand48.rs index 92a1c68d4d..f8b3b4e35a 100644 --- a/src/header/stdlib/rand48.rs +++ b/src/header/stdlib/rand48.rs @@ -1,4 +1,4 @@ -//! Helper functions for pseudorandom number generation using LCG, see https://pubs.opengroup.org/onlinepubs/9699919799.2018edition/functions/drand48.html +//! Helper functions for pseudorandom number generation using LCG, see . use crate::{ platform::types::{c_double, c_long, c_ushort}, diff --git a/src/header/stdlib/random.rs b/src/header/stdlib/random.rs index 253a85beb6..86aec6f3db 100644 --- a/src/header/stdlib/random.rs +++ b/src/header/stdlib/random.rs @@ -1,4 +1,4 @@ -//! Helper functions for random() and friends, see https://pubs.opengroup.org/onlinepubs/7908799/xsh/initstate.html +//! Helper functions for random() and friends, see . // Ported from musl's implementation (src/prng/random.c) use crate::{ diff --git a/src/header/sys_time/mod.rs b/src/header/sys_time/mod.rs index 2637e04076..ce4dd07e55 100644 --- a/src/header/sys_time/mod.rs +++ b/src/header/sys_time/mod.rs @@ -3,7 +3,7 @@ //! See . //! //! Note that since the Open Group Base Specifications Issue 8, the -//! [`timeval`](crate::header::sys_select::timeval) struct has been moved to +//! [`timeval`] struct has been moved to //! the [`sys/select.h`](crate::header::sys_select) header. use crate::{ diff --git a/src/io/buffered.rs b/src/io/buffered.rs index 1289d47056..a25273185c 100644 --- a/src/io/buffered.rs +++ b/src/io/buffered.rs @@ -206,9 +206,9 @@ impl Seek for BufReader { /// `.into_inner()` immediately after a seek yields the underlying reader /// at the same position. /// - /// To seek without discarding the internal buffer, use [`Seek::seek_relative`]. + /// To seek without discarding the internal buffer, use [`seek_relative`](crate::io::BufReader::seek_relative). /// - /// See [`std::io::Seek`] for more details. + /// See [`std::io::Seek`](https://doc.rust-lang.org/std/io/trait.Seek.html) for more details. /// /// Note: In the edge case where you're seeking with `SeekFrom::Current(n)` /// where `n` minus the internal buffer length overflows an `i64`, two diff --git a/src/ld_so/tcb.rs b/src/ld_so/tcb.rs index 4aefb117aa..2f90ad8cb6 100644 --- a/src/ld_so/tcb.rs +++ b/src/ld_so/tcb.rs @@ -50,7 +50,7 @@ pub struct Tcb { pub generic: GenericTcb, /// Pointer to a list of initial TLS data pub masters_ptr: *mut Master, - /// Size of the masters list in bytes (multiple of mem::size_of::()) + /// Size of the masters list in bytes (multiple of `mem::size_of::()`) pub masters_len: usize, /// Index of last copied Master pub num_copied_masters: usize,