[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <875xij1ouy.fsf@kernel.org>
Date: Fri, 02 May 2025 08:57:41 +0200
From: Andreas Hindborg <a.hindborg@...nel.org>
To: "Miguel Ojeda" <miguel.ojeda.sandonis@...il.com>
Cc: "Danilo Krummrich" <dakr@...nel.org>, "Miguel Ojeda"
<ojeda@...nel.org>, "Alex Gaynor" <alex.gaynor@...il.com>, "Boqun Feng"
<boqun.feng@...il.com>, "Gary Guo" <gary@...yguo.net>, Björn Roy Baron
<bjorn3_gh@...tonmail.com>, "Benno Lossin" <benno.lossin@...ton.me>,
"Alice Ryhl" <aliceryhl@...gle.com>, "Trevor Gross" <tmgross@...ch.edu>,
"Joel Becker" <jlbec@...lplan.org>, "Peter Zijlstra"
<peterz@...radead.org>, "Ingo Molnar" <mingo@...hat.com>, "Will Deacon"
<will@...nel.org>, "Waiman Long" <longman@...hat.com>, "Fiona Behrens"
<me@...enk.dev>, "Charalampos Mitrodimas" <charmitro@...teo.net>,
"Daniel Almeida" <daniel.almeida@...labora.com>, "Breno Leitao"
<leitao@...ian.org>, <rust-for-linux@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 1/3] rust: configfs: introduce rust support for configfs
"Miguel Ojeda" <miguel.ojeda.sandonis@...il.com> writes:
> On Thu, May 1, 2025 at 11:28 PM Miguel Ojeda
> <miguel.ojeda.sandonis@...il.com> wrote:
>>
>> Ah -- that explains it. Yeah, your calls to `add` were from const
>> contexts, which explains what you were trying to say.
>
> No, wait, they are not from const context. So a "normal" `assert!`
> there would have never worked.
Right, they are not from const context, but they are inside a `let`
statement, so if all the captured variables are constant (which they
are), the let statement will be evaluated in const context [1], right?
Best regards,
Andreas Hindborg
[1] https://doc.rust-lang.org/reference/const_eval.html#r-const-eval.const-context.init
Powered by blists - more mailing lists