]> www.infradead.org Git - users/hch/misc.git/commitdiff
rust: file: add intra-doc link for 'EBADF'
authorTong Li <djfkvcing117@gmail.com>
Tue, 30 Sep 2025 11:02:58 +0000 (19:02 +0800)
committerChristian Brauner <brauner@kernel.org>
Tue, 7 Oct 2025 10:48:33 +0000 (12:48 +0200)
The `BadFdError` doc comment mentions the `EBADF` constant but does
not currently provide a navigation target for readers of the
generated docs. Turning the references into intra-doc links matches
the rest of the module and makes the documentation easier to
explore.

Suggested-by: Onur Özkan <work@onurozkan.dev>
Link: https://github.com/Rust-for-Linux/linux/issues/1186
Signed-off-by: Tong Li <djfkvcing117@gmail.com>
Reviewed-by: Onur Özkan <work@onurozkan.dev>
Signed-off-by: Christian Brauner <brauner@kernel.org>
rust/kernel/fs/file.rs

index cf06e73a6da041122a41eca35cfe78df74890914..cd698785033219710caa35ab5b3fb723d6f0d2c7 100644 (file)
@@ -448,9 +448,9 @@ impl Drop for FileDescriptorReservation {
     }
 }
 
-/// Represents the `EBADF` error code.
+/// Represents the [`EBADF`] error code.
 ///
-/// Used for methods that can only fail with `EBADF`.
+/// Used for methods that can only fail with [`EBADF`].
 #[derive(Copy, Clone, Eq, PartialEq)]
 pub struct BadFdError;