[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72m8jmW0WEmscR3+C2aiL+FCzYZXj2SrfruCu4UB98ZCYg@mail.gmail.com>
Date: Sun, 26 Feb 2023 14:40:44 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Boqun Feng <boqun.feng@...il.com>
Cc: Gary Guo <gary@...yguo.net>, Asahi Lina <lina@...hilina.net>,
Miguel Ojeda <ojeda@...nel.org>,
Alex Gaynor <alex.gaynor@...il.com>,
Wedson Almeida Filho <wedsonaf@...il.com>,
Björn Roy Baron <bjorn3_gh@...tonmail.com>,
Sven Van Asbroeck <thesven73@...il.com>,
Fox Chen <foxhlchen@...il.com>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org, asahi@...ts.linux.dev
Subject: Re: [PATCH 5/5] rust: error: Add from_kernel_result!() macro
On Sun, Feb 26, 2023 at 3:22 AM Boqun Feng <boqun.feng@...il.com> wrote:
>
> Hmm.. looks like the `?` only "propagating them (the errors) to the
> calling *function*":
>
> https://doc.rust-lang.org/reference/expressions/operator-expr.html#the-question-mark-operator
>
> , so this doesn't work as we expect:
>
> https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=64c9039e1da2c436f9f4f5ea46e97e90
>
> Hope I didn't miss something subtle here..
There is `feature(try_blocks)` [1] for that:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=8f40663d2ad51e04a13f2da5c4580fc0
[1] https://github.com/rust-lang/rust/issues/31436.
Cheers,
Miguel
Powered by blists - more mailing lists