Skip to content

Commit 0b7ccf4

Browse files
authored
Miscellaneous documentation cleanups. (#894)
1 parent 3f338d8 commit 0b7ccf4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+289
-282
lines changed

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -55,28 +55,28 @@ building.
5555
The modules [`rustix::io`], [`rustix::fd`], and [`rustix::ffi`] are enabled
5656
by default. The rest of the API is conditional with cargo feature flags:
5757

58-
| Name | Description
59-
| ---------- | ---------------------
60-
| `event` | [`rustix::event`]—Polling and event operations.
61-
| `fs` | [`rustix::fs`]—Filesystem operations.
62-
| `io_uring` | [`rustix::io_uring`]—Linux io_uring.
63-
| `mm` | [`rustix::mm`]—Memory map operations.
64-
| `mount` | [`rustix::mount`]—Linux mount API.
65-
| `net` | [`rustix::net`]—Network-related operations.
66-
| `param` | [`rustix::param`]—Process parameters.
67-
| `pipe` | [`rustix::pipe`]—Pipe operations.
68-
| `process` | [`rustix::process`]—Process-associated operations.
69-
| `procfs` | [`rustix::procfs`]—Utilities for reading `/proc` on Linux.
70-
| `pty` | [`rustix::pty`]—Pseudoterminal operations.
71-
| `rand` | [`rustix::rand`]—Random-related operations.
72-
| `shm` | [`rustix::shm`]—POSIX shared memory.
73-
| `stdio` | [`rustix::stdio`]—Stdio-related operations.
74-
| `system` | [`rustix::system`]—System-related operations.
75-
| `termios` | [`rustix::termios`]—Terminal I/O stream operations.
76-
| `thread` | [`rustix::thread`]—Thread-associated operations.
77-
| `time` | [`rustix::time`]—Time-related operations.
78-
| |
79-
| `use-libc` | Enable the libc backend.
58+
| Name | Description |
59+
| ---------- | -------------------------------------------------------------- |
60+
| `event` | [`rustix::event`]—Polling and event operations. |
61+
| `fs` | [`rustix::fs`]—Filesystem operations. |
62+
| `io_uring` | [`rustix::io_uring`]—Linux io_uring. |
63+
| `mm` | [`rustix::mm`]—Memory map operations. |
64+
| `mount` | [`rustix::mount`]—Linux mount API. |
65+
| `net` | [`rustix::net`]—Network-related operations. |
66+
| `param` | [`rustix::param`]—Process parameters. |
67+
| `pipe` | [`rustix::pipe`]—Pipe operations. |
68+
| `process` | [`rustix::process`]—Process-associated operations. |
69+
| `procfs` | [`rustix::procfs`]—Utilities for reading `/proc` on Linux. |
70+
| `pty` | [`rustix::pty`]—Pseudoterminal operations. |
71+
| `rand` | [`rustix::rand`]—Random-related operations. |
72+
| `shm` | [`rustix::shm`]—POSIX shared memory. |
73+
| `stdio` | [`rustix::stdio`]—Stdio-related operations. |
74+
| `system` | [`rustix::system`]—System-related operations. |
75+
| `termios` | [`rustix::termios`]—Terminal I/O stream operations. |
76+
| `thread` | [`rustix::thread`]—Thread-associated operations. |
77+
| `time` | [`rustix::time`]—Time-related operations. |
78+
| | |
79+
| `use-libc` | Enable the libc backend. |
8080

8181
[`rustix::event`]: https://docs.rs/rustix/*/rustix/event/index.html
8282
[`rustix::fs`]: https://docs.rs/rustix/*/rustix/fs/index.html

examples/termios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn main() -> std::io::Result<()> {
2828

2929
tcsetattr(&tty, OptionalActions::Flush, &raw)?;
3030

31-
print!("Raw settings; press any key...");
31+
print!("Raw settings; press any key");
3232
std::io::stdout().flush()?;
3333
let mut buf = [0_u8];
3434
let _input = std::io::stdin().read(&mut buf)?;

src/backend/libc/event/epoll.rs

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
//! epoll support.
2-
//!
3-
//! This is an experiment, and it isn't yet clear whether epoll is the right
4-
//! level of abstraction at which to introduce safety. But it works fairly well
5-
//! in simple examples 🙂.
1+
//! Linux `epoll` support.
62
//!
73
//! # Examples
84
//!
@@ -96,7 +92,7 @@ bitflags! {
9692
/// `EPOLL_CLOEXEC`
9793
const CLOEXEC = bitcast!(c::EPOLL_CLOEXEC);
9894

99-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
95+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
10096
const _ = !0;
10197
}
10298
}
@@ -152,7 +148,7 @@ bitflags! {
152148
#[cfg(not(target_os = "android"))]
153149
const EXCLUSIVE = bitcast!(c::EPOLLEXCLUSIVE);
154150

155-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
151+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
156152
const _ = !0;
157153
}
158154
}

src/backend/libc/event/poll_fd.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ bitflags! {
4848
)]
4949
const RDHUP = c::POLLRDHUP;
5050

51-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
51+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
5252
const _ = !0;
5353
}
5454
}

src/backend/libc/event/types.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ bitflags! {
3131
#[cfg(not(target_os = "espidf"))]
3232
const SEMAPHORE = bitcast!(c::EFD_SEMAPHORE);
3333

34-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
34+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
3535
const _ = !0;
3636
}
3737
}

src/backend/libc/fs/inotify.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ bitflags! {
1818
/// `IN_NONBLOCK`
1919
const NONBLOCK = bitcast!(c::IN_NONBLOCK);
2020

21-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
21+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
2222
const _ = !0;
2323
}
2424
}
@@ -75,7 +75,7 @@ bitflags! {
7575
/// `IN_ONLYDIR`
7676
const ONLYDIR = c::IN_ONLYDIR;
7777

78-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
78+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
7979
const _ = !0;
8080
}
8181
}

src/backend/libc/fs/types.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ bitflags! {
2121
/// `F_OK`
2222
const EXISTS = c::F_OK;
2323

24-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
24+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
2525
const _ = !0;
2626
}
2727
}
@@ -77,7 +77,7 @@ bitflags! {
7777
#[cfg(all(target_os = "linux", target_env = "gnu"))]
7878
const STATX_DONT_SYNC = bitcast!(c::AT_STATX_DONT_SYNC);
7979

80-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
80+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
8181
const _ = !0;
8282
}
8383
}
@@ -151,7 +151,7 @@ bitflags! {
151151
#[cfg(not(any(target_os = "espidf", target_os = "vita")))]
152152
const SVTX = c::S_ISVTX as RawMode;
153153

154-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
154+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
155155
const _ = !0;
156156
}
157157
}
@@ -328,7 +328,7 @@ bitflags! {
328328
#[cfg(target_os = "freebsd")]
329329
const EMPTY_PATH = bitcast!(c::O_EMPTY_PATH);
330330

331-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
331+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
332332
const _ = !0;
333333
}
334334
}
@@ -347,7 +347,7 @@ bitflags! {
347347
/// `CLONE_NOOWNERCOPY`
348348
const NOOWNERCOPY = 2;
349349

350-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
350+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
351351
const _ = !0;
352352
}
353353
}
@@ -392,7 +392,7 @@ bitflags! {
392392
/// `COPYFILE_ALL`
393393
const ALL = copyfile::ALL;
394394

395-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
395+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
396396
const _ = !0;
397397
}
398398
}
@@ -423,7 +423,7 @@ bitflags! {
423423
/// `RESOLVE_CACHED` (since Linux 5.12)
424424
const CACHED = 0x20;
425425

426-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
426+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
427427
const _ = !0;
428428
}
429429
}
@@ -445,7 +445,7 @@ bitflags! {
445445
/// `RENAME_WHITEOUT`
446446
const WHITEOUT = bitcast!(c::RENAME_WHITEOUT);
447447

448-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
448+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
449449
const _ = !0;
450450
}
451451
}
@@ -625,7 +625,7 @@ bitflags! {
625625
/// `MFD_HUGE_16GB`
626626
const HUGE_16GB = c::MFD_HUGE_16GB;
627627

628-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
628+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
629629
const _ = !0;
630630
}
631631
}
@@ -652,7 +652,7 @@ bitflags! {
652652
#[cfg(linux_kernel)]
653653
const FUTURE_WRITE = bitcast!(c::F_SEAL_FUTURE_WRITE);
654654

655-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
655+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
656656
const _ = !0;
657657
}
658658
}
@@ -713,7 +713,7 @@ bitflags! {
713713
/// `STATX_ALL`
714714
const ALL = c::STATX_ALL;
715715

716-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
716+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
717717
const _ = !0;
718718
}
719719
}
@@ -774,7 +774,7 @@ bitflags! {
774774
/// `STATX_ALL`
775775
const ALL = 0xfff;
776776

777-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
777+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
778778
const _ = !0;
779779
}
780780
}
@@ -867,7 +867,7 @@ bitflags! {
867867
)))]
868868
const UNSHARE_RANGE = bitcast!(c::FALLOC_FL_UNSHARE_RANGE);
869869

870-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
870+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
871871
const _ = !0;
872872
}
873873
}
@@ -919,7 +919,7 @@ bitflags! {
919919
#[cfg(any(linux_kernel, target_os = "emscripten", target_os = "fuchsia"))]
920920
const SYNCHRONOUS = c::ST_SYNCHRONOUS as u64;
921921

922-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
922+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
923923
const _ = !0;
924924
}
925925
}

src/backend/libc/io/types.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ bitflags! {
1212
/// `FD_CLOEXEC`
1313
const CLOEXEC = bitcast!(c::FD_CLOEXEC);
1414

15-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
15+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
1616
const _ = !0;
1717
}
1818
}
@@ -37,7 +37,7 @@ bitflags! {
3737
/// `RWF_APPEND` (since Linux 4.16)
3838
const APPEND = linux_raw_sys::general::RWF_APPEND;
3939

40-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
40+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
4141
const _ = !0;
4242
}
4343
}
@@ -59,7 +59,7 @@ bitflags! {
5959
)))] // Android 5.0 has dup3, but libc doesn't have bindings
6060
const CLOEXEC = bitcast!(c::O_CLOEXEC);
6161

62-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
62+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
6363
const _ = !0;
6464
}
6565
}

src/backend/libc/mm/types.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ bitflags! {
1717
/// `PROT_EXEC`
1818
const EXEC = bitcast!(c::PROT_EXEC);
1919

20-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
20+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
2121
const _ = !0;
2222
}
2323
}
@@ -59,7 +59,7 @@ bitflags! {
5959
#[cfg(all(linux_kernel, any(target_arch = "sparc", target_arch = "sparc64")))]
6060
const ADI = linux_raw_sys::general::PROT_ADI;
6161

62-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
62+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
6363
const _ = !0;
6464
}
6565
}
@@ -231,7 +231,7 @@ bitflags! {
231231
#[cfg(any())]
232232
const UNINITIALIZED = bitcast!(c::MAP_UNINITIALIZED);
233233

234-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
234+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
235235
const _ = !0;
236236
}
237237
}
@@ -250,7 +250,7 @@ bitflags! {
250250
/// `MREMAP_MAYMOVE`
251251
const MAYMOVE = bitcast!(c::MREMAP_MAYMOVE);
252252

253-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
253+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
254254
const _ = !0;
255255
}
256256
}
@@ -272,7 +272,7 @@ bitflags! {
272272
/// written).
273273
const INVALIDATE = bitcast!(c::MS_INVALIDATE);
274274

275-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
275+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
276276
const _ = !0;
277277
}
278278
}
@@ -288,7 +288,7 @@ bitflags! {
288288
/// `MLOCK_ONFAULT`
289289
const ONFAULT = bitcast!(c::MLOCK_ONFAULT);
290290

291-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
291+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
292292
const _ = !0;
293293
}
294294
}
@@ -438,7 +438,7 @@ bitflags! {
438438
/// `O_NONBLOCK`
439439
const NONBLOCK = bitcast!(c::O_NONBLOCK);
440440

441-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
441+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
442442
const _ = !0;
443443
}
444444
}
@@ -462,7 +462,7 @@ bitflags! {
462462
/// the process.
463463
const CURRENT = bitcast!(libc::MCL_CURRENT);
464464

465-
/// <https://docs.rs/bitflags/latest/bitflags/#externally-defined-flags>
465+
/// <https://docs.rs/bitflags/*/bitflags/#externally-defined-flags>
466466
const _ = !0;
467467
}
468468
}

0 commit comments

Comments
 (0)