Re: [PATCH v5 21/38] rust: ptr: add const_align_up() and enable inline_const feature
From: Gary Guo
Date: Thu Mar 05 2026 - 08:04:12 EST
On Thu Mar 5, 2026 at 12:36 PM GMT, Danilo Krummrich wrote:
> On Thu Mar 5, 2026 at 1:28 PM CET, Gary Guo wrote:
>> This is fine, too, although I think just returning an `Option` and ask user to
>> unwrap it in const eval is better.
>
> Well, that was my initial proposal (except that it was Result and
> const_expect()).
>
> IIRC, you were against this in favor of build_assert!()?
I think I was just commenting about the API design, and not the idea in general.
My view is that should either completely mimick the non-const API (just with
functions so it doesn't need const trait impl), or we should go all the way to
`build_assert!()`. Either is fine.
Best,
Gary