lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3599677c19457baf5a68ddff563b6c9d8effdca6.camel@mailbox.org>
Date: Mon, 05 Jan 2026 16:23:20 +0100
From: Maurice Hieronymus <mhi@...lbox.org>
To: Danilo Krummrich <dakr@...nel.org>, Benno Lossin <lossin@...nel.org>
Cc: 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, 2026-01-05 at 16:00 +0100, Danilo Krummrich wrote:
> 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.

Sounds good to me too. I will change my implementation and send a V3
shortly.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ