qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kevin Wolf <kwolf@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: qemu-devel@nongnu.org, qemu-rust@nongnu.org, qemu-block@nongnu.org
Subject: Re: [PATCH 2/2] rust: add module to convert between -errno and io::Error
Date: Tue, 18 Feb 2025 18:57:02 +0100	[thread overview]
Message-ID: <Z7TJ7hM8PcIOVOg2@redhat.com> (raw)
In-Reply-To: <20250213143216.3910163-3-pbonzini@redhat.com>

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



      parent reply	other threads:[~2025-02-18 17:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-13 14:32 [PATCH v2 0/2] rust: add module to convert between -errno and io::Error Paolo Bonzini
2025-02-13 14:32 ` [PATCH 1/2] rust: subprojects: add libc crate Paolo Bonzini
2025-02-19 15:27   ` Zhao Liu
2025-02-13 14:32 ` [PATCH 2/2] rust: add module to convert between -errno and io::Error Paolo Bonzini
2025-02-18 13:57   ` Kevin Wolf
2025-02-18 17:57   ` Kevin Wolf [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z7TJ7hM8PcIOVOg2@redhat.com \
    --to=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-rust@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).