Skip to content

Commit 4fe5fd5

Browse files
author
Bryant Mairs
committed
Cleanup all doc warnings
With the impending switch to Pulldown as the default doc generator, warnings have been enabled for incompatible syntax. This fixes all of said warnings.
1 parent d374a1e commit 4fe5fd5

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

src/sys/aio.rs

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ impl<'a> AioCb<'a> {
9797
/// Constructs a new `AioCb` with no associated buffer.
9898
///
9999
/// The resulting `AioCb` structure is suitable for use with `AioCb::fsync`.
100+
///
100101
/// * `fd` File descriptor. Required for all aio functions.
101102
/// * `prio` If POSIX Prioritized IO is supported, then the operation will
102103
/// be prioritized at the process's priority level minus `prio`

src/sys/mman.rs

+1-2
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ libc_bitflags!{
100100
libc_enum!{
101101
/// Usage information for a range of memory to allow for performance optimizations by the kernel.
102102
///
103-
/// Used by [`madvise`].
104-
/// [`madvise`]: ./fn.madvise.html
103+
/// Used by [`madvise`](./fn.madvise.html).
105104
#[repr(i32)]
106105
pub enum MmapAdvise {
107106
/// No further special treatment. This is the default.

src/sys/quota.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,11 @@ libc_enum!{
5959
QFMT_VFS_OLD,
6060
/// Use the standard VFS v0 quota format.
6161
///
62-
/// Handles 32-bit UIDs/GIDs and quota limits up to 2^42 bytes/2^32 inodes.
62+
/// Handles 32-bit UIDs/GIDs and quota limits up to 2<sup>32</sup> bytes/2<sup>32</sup> inodes.
6363
QFMT_VFS_V0,
6464
/// Use the VFS v1 quota format.
6565
///
66-
/// Handles 32-bit UIDs/GIDs and quota limits of 2^64 bytes/2^64 inodes.
66+
/// Handles 32-bit UIDs/GIDs and quota limits of 2<sup>64</sup> bytes/2<sup>64</sup> inodes.
6767
QFMT_VFS_V1,
6868
}
6969
}

src/sys/select.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ impl FdSet {
7676
/// # Parameters
7777
///
7878
/// * `nfds`: The highest file descriptor set in any of the passed `FdSet`s, plus 1. If `None`, this
79-
/// is calculated automatically by calling [`FdSet::highest`] on all descriptor sets and adding 1
79+
/// is calculated automatically by calling [`FdSet::highest`][1] on all descriptor sets and adding 1
8080
/// to the maximum of that.
8181
/// * `readfds`: File descriptors to check for being ready to read.
8282
/// * `writefds`: File descriptors to check for being ready to write.
@@ -87,7 +87,8 @@ impl FdSet {
8787
/// # References
8888
///
8989
/// [select(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/select.html)
90-
/// [`FdSet::highest`]: struct.FdSet.html#method.highest
90+
///
91+
/// [1]: struct.FdSet.html#method.highest
9192
pub fn select<'a, N, R, W, E, T>(nfds: N,
9293
readfds: R,
9394
writefds: W,

src/unistd.rs

+8-5
Original file line numberDiff line numberDiff line change
@@ -814,9 +814,10 @@ pub fn write(fd: RawFd, buf: &[u8]) -> Result<usize> {
814814
Errno::result(res).map(|r| r as usize)
815815
}
816816

817-
/// Directive that tells [`lseek`] and [`lseek64`] what the offset is relative to.
818-
/// [`lseek`]: ./fn.lseek.html
819-
/// [`lseek64`]: ./fn.lseek64.html
817+
/// Directive that tells [`lseek`][1] and [`lseek64`][2] what the offset is relative to.
818+
///
819+
/// [1]: ./fn.lseek.html
820+
/// [2]: ./fn.lseek64.html
820821
#[repr(i32)]
821822
pub enum Whence {
822823
/// Specify an offset relative to the start of the file.
@@ -847,7 +848,7 @@ pub enum Whence {
847848

848849
/// Move the read/write file offset.
849850
///
850-
/// See also [lseek(2)(http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html)
851+
/// See also [lseek(2)](http://pubs.opengroup.org/onlinepubs/9699919799/functions/lseek.html)
851852
pub fn lseek(fd: RawFd, offset: libc::off_t, whence: Whence) -> Result<libc::off_t> {
852853
let res = unsafe { libc::lseek(fd, offset, whence as i32) };
853854

@@ -1124,6 +1125,7 @@ pub fn getgroups() -> Result<Vec<Gid>> {
11241125
/// specific user and group. For example, given the user `www-data` with UID
11251126
/// `33` and the group `backup` with the GID `34`, one could switch the user as
11261127
/// follows:
1128+
///
11271129
/// ```
11281130
/// let uid = Uid::from_raw(33);
11291131
/// let gid = Gid::from_raw(34);
@@ -1245,6 +1247,7 @@ pub fn getgrouplist(user: &CStr, group: Gid) -> Result<Vec<Gid>> {
12451247
/// UID and GID for the user in the system's password database (usually found
12461248
/// in `/etc/passwd`). If the `www-data` user's UID and GID were `33` and `33`,
12471249
/// respectively, one could switch the user as follows:
1250+
///
12481251
/// ```
12491252
/// let user = CString::new("www-data").unwrap();
12501253
/// let uid = Uid::from_raw(33);
@@ -1280,7 +1283,7 @@ pub fn pause() -> Result<()> {
12801283

12811284
/// Suspend execution for an interval of time
12821285
///
1283-
/// See also [sleep(2)(http://pubs.opengroup.org/onlinepubs/009695399/functions/sleep.html#tag_03_705_05)
1286+
/// See also [sleep(2)](http://pubs.opengroup.org/onlinepubs/009695399/functions/sleep.html#tag_03_705_05)
12841287
// Per POSIX, does not fail
12851288
#[inline]
12861289
pub fn sleep(seconds: libc::c_uint) -> c_uint {

0 commit comments

Comments
 (0)