qemu-rust
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/2] rust: add module to convert between -errno and io::Error


From: Kevin Wolf
Subject: Re: [PATCH 2/2] rust: add module to convert between -errno and io::Error
Date: Tue, 18 Feb 2025 18:57:02 +0100

Am 13.02.2025 um 15:32 hat Paolo Bonzini geschrieben:
> It is a common convention in QEMU to return a positive value in case of
> success, and a negated errno value in case of error.  Unfortunately,
> using errno portably in Rust is a bit complicated; on Unix the errno
> values are supported natively by io::Error, but on Windows they are not;
> so, use the libc crate.
> 
> This is a set of utility functions that are used by both chardev and
> block layer bindings.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

'make rustdoc' fails for me with this patch applied:

error: unresolved link to `io::Result`
   --> qemu-api/src/errno.rs:105:55
    |
105 |     /// A signed type that can be converted into an [`io::Result`]
    |                                                       ^^^^^^^^^^ no item 
named `io` in scope
    |
    = note: requested on the command line with `-D 
rustdoc::broken-intra-doc-links`

error: unresolved link to `io::Result`
   --> qemu-api/src/errno.rs:114:46
    |
114 |     /// A type that can be taken out of an [`io::Result`] and converted
    |                                              ^^^^^^^^^^ no item named 
`io` in scope

error: unresolved link to `into_neg_errno`
   --> qemu-api/src/errno.rs:118:15
    |
118 |         /// [`into_neg_errno`].
    |               ^^^^^^^^^^^^^^ no item named `into_neg_errno` in scope
    |
    = help: to escape `[` and `]` characters, add '\' before them like `\[` or 
`\]`

error: could not document `qemu_api`

Kevin




reply via email to

[Prev in Thread] Current Thread [Next in Thread]