Thread (28 messages) 28 messages, 6 authors, 2024-11-15

Re: [PATCH RFC 2/3] rust: Add bindings for device properties

From: Miguel Ojeda <hidden>
Date: 2024-10-29 18:30:07
Also in: lkml, rust-for-linux

On Tue, Oct 29, 2024 at 6:58 PM Rob Herring [off-list ref] wrote:
I really want a build error if the type is wrong, then the _ case
would be unreachable. No way to do that?
When you need to work with a set of types, you would normally define a
trait and implement it only for those traits, e.g. see
rust/kernel/transmute.rs. Then it is a build error if you don't
satisfy bounds etc.

Cheers,
Miguel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help