rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
PATCH v4 1/1 rust/fs: use intra-doc link for `EBADF` in `BadFdError` docs
From: Tong Li <[email protected]>
In rust/kernel/fs/file.rs, replace EBADF with [EBADF].
This helps rust-analyzer to resolve such references.
--- rust/kernel/fs/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
rust/kernel/fs/file.rs +2 -2
@@ -448,9 +448,9 @@ fn drop(&mut self) { } } -/// 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 ;
Signature · 1 line
2.51.0
Quoted 19 lines · On Thu, 18 Sep 2025 00:50:59 +0800 [email protected] wrote:
From: Tong Li <[email protected]>
In
rust/kernel/fs/file.rs, replaceEBADFwith [EBADF].This helps rust-analyzer to resolve such references.
Suggested-by Onur Özkan <[email protected]>Signed-off-by Tong Li <[email protected]>--- rust/kernel/fs/file.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)rust/kernel/fs/file.rs +0
-0@@ -448,9 +448,9 @@ fn drop(&mut self) { }
rust/kernel/fs/file.rs fn drop(&mut self) { · line 456
Quoted 10 lines
rust/kernel/fs/file.rs +2
-2} -/// 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 ;
Quoted 6 lines · On Wed, Sep 17, 2025 at 6:51 PM <[email protected]> wrote:
From: Tong Li <[email protected]>
In
rust/kernel/fs/file.rs, replaceEBADFwith [EBADF].This helps rust-analyzer to resolve such references.
I would instead say:
rust: file: add intra-doc link for EBADF
or similar, since that is what those are -- they are rendered by rustdoc (and of course possibly used by other tooling).
The change itself looks fine to me.
However, it isn't sent to the right maintainers (VFS) -- please use scripts/get_maintainer.pl to get them :)
Thanks!
Cheers,
Miguel