[PATCH] rust/fs: use intra-doc link for `EBADF` in `BadFdError` do=

From: Webb321
Date: Tue Sep 16 2025 - 10:58:26 EST


In `rust/kernel/fs/file.rs`, replace plain text `EBADF` references in
the doc comment of `BadFdError` with intra-doc links [`EBADF`].
This improves the generated documentation (so the `EBADF` constant is
linked), and helps tools like rust-analyzer to resolve the reference
from the docs.

Testing:
- regenerated documentation, confirmed the link to `EBADF` shows up correct=
ly,
- ran doctests to ensure no broken links in docs,
- built affected code with rustfmt / clippy to verify formatting and
lint cleanliness.

Suggested-by: Onur =C3=96zkan <work@xxxxxxxxxxxxx>
Link: https://github.com/Rust-for-Linux/linux/issues/1186

Signed-off-by: djfkvcing117@xxxxxxxxx
---
rust/kernel/fs/file.rs | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/rust/kernel/fs/file.rs b/rust/kernel/fs/file.rs
index 67a3654f0fd370..f3153f4c8560bb 100644
--- a/rust/kernel/fs/file.rs
+++ b/rust/kernel/fs/file.rs
@@ -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;