[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANiq72=Hgqt4jPGw_pXmReWaVXWUZm8YofdqUeSde94apozhAw@mail.gmail.com>
Date: Fri, 7 Feb 2025 19:12:00 +0100
From: Miguel Ojeda <miguel.ojeda.sandonis@...il.com>
To: Tamir Duberstein <tamird@...il.com>
Cc: 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>, Andreas Hindborg <a.hindborg@...nel.org>,
Alice Ryhl <aliceryhl@...gle.com>, Trevor Gross <tmgross@...ch.edu>,
Danilo Krummrich <dakr@...nel.org>, rust-for-linux@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] rust: macros: improve panic messages
On Fri, Feb 7, 2025 at 6:22 PM Tamir Duberstein <tamird@...il.com> wrote:
>
> Include unexpected input on parsing failures. This has the side effect
> of avoiding a spurious rust-analyzer warning:
>
> Variable `None` should have snake_case name, e.g. `none`
Hmm... That should be solved independently, but sure.
In any case, how is this related to the second patch in the series?
i.e. do you need both to solve the macOS issue?
> + let Some(token) = it.next() else {
> + break;
> + };
> + match token {
> + TokenTree::Punct(punct) => assert_eq!(punct.as_char(), ','),
> + token => panic!("Expected ',' or end of array, got {}", token),
Do we want to shadow here?
Also, I think you could write `{token}`. Same above.
Could you please show how the new output would look like in the commit message?
Cheers,
Miguel
Powered by blists - more mailing lists