mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] rust: num: add cv! macro to create values from constant expressions (alt)
@ 2026-08-28 12:03 Gary Guo
  2026-08-28 12:03 ` [PATCH 1/2] rust: build_assert: add utility to require const eval Gary Guo
  2026-08-28 12:03 ` [PATCH 2/2] rust: num: add `cv!` macro to create values from constant expressions Gary Guo
  0 siblings, 2 replies; 5+ messages in thread
From: Gary Guo @ 2026-08-28 12:03 UTC (permalink / raw)
  To: Alexandre Courbot, Eliot Courtney, Yury Norov, Miguel Ojeda,
	Boqun Feng, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, Danilo Krummrich, Daniel Almeida,
	Tamir Duberstein, Onur Özkan
  Cc: linux-kernel, rust-for-linux, Gary Guo

This is an alternative to
https://lore.kernel.org/rust-for-linux/20260828-cv-v1-0-48a180dfc4c8@nvidia.com/
and
https://lore.kernel.org/rust-for-linux/20260827-chid-v8-3-bc74c77d0214@nvidia.com
without const generic expressions limitation.

Please see the detailed description in patch 2.

Signed-off-by: Gary Guo <gary@garyguo.net>
---
Gary Guo (2):
      rust: build_assert: add utility to require const eval
      rust: num: add `cv!` macro to create values from constant expressions

 rust/build_error.rs         |   7 ++
 rust/kernel/build_assert.rs |   9 +-
 rust/kernel/device_id.rs    |   4 +
 rust/kernel/num.rs          | 209 +++++++++++++++++++++++++++++++++++++++++++-
 rust/kernel/num/bounded.rs  |  21 +++++
 rust/kernel/ptr.rs          |  21 ++++-
 rust/macros/const_eval.rs   |  24 +++++
 rust/macros/lib.rs          |  21 +++++
 8 files changed, 313 insertions(+), 3 deletions(-)
---
base-commit: e6664f2b33db9b6811eb4cec109f06cb2b4f458d
change-id: 20260828-cv-acaf3400d16c

Best regards,
--  
Gary Guo <gary@garyguo.net>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-29  4:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-28 12:03 [PATCH 0/2] rust: num: add cv! macro to create values from constant expressions (alt) Gary Guo
2026-08-28 12:03 ` [PATCH 1/2] rust: build_assert: add utility to require const eval Gary Guo
2026-08-28 12:03 ` [PATCH 2/2] rust: num: add `cv!` macro to create values from constant expressions Gary Guo
2026-08-28 14:18   ` Gary Guo
2026-08-29  4:05   ` Alexandre Courbot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®