[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <DFGQUPHJVF5M.3EZ2KL4XIMDJH@kernel.org>
Date: Mon, 05 Jan 2026 16:00:41 +0100
From: "Danilo Krummrich" <dakr@...nel.org>
To: "Benno Lossin" <lossin@...nel.org>
Cc: "Maurice Hieronymus" <mhi@...lbox.org>, <aliceryhl@...gle.com>,
<acourbot@...dia.com>, <airlied@...il.com>, <simona@...ll.ch>,
<nouveau@...ts.freedesktop.org>, <dri-devel@...ts.freedesktop.org>,
<linux-kernel@...r.kernel.org>, <ojeda@...nel.org>, <boqun.feng@...il.com>,
<gary@...yguo.net>, <bjorn3_gh@...tonmail.com>, <a.hindborg@...nel.org>,
<tmgross@...ch.edu>, <rust-for-linux@...r.kernel.org>
Subject: Re: [PATCH v2 1/2] rust: macros: Add derive Display for enums
On Mon Jan 5, 2026 at 3:42 PM CET, Benno Lossin wrote:
> I'm still skeptical about having a derive macro for `Display`. What
> about adding & deriving the following trait instead:
>
> pub trait EnumVariantName {
> fn variant_name(&self) -> &'static str;
> }
With a derive macro for this trait, that sounds absolutely reasonable -- a
corresponding Display implementation becomes trivial with this.
Powered by blists - more mailing lists