Re: [PATCH v5 1/4] rust: macros: add derive macro for `Into`

From: Jesung Yang

Date: Fri Jan 30 2026 - 05:04:26 EST


On Fri Jan 30, 2026 at 1:11 AM KST, Charalampos Mitrodimas wrote:
> Jesung Yang via B4 Relay <devnull+y.j3ms.n.gmail.com@xxxxxxxxxx> writes:
>> +/// ```compile_fail
>> +/// # use kernel::macros::Into;
>> +/// // `repr(C)` enums are not allowed.
>> +/// #[derive(Into)]
>> +/// struct Foo(u8);
>
> Should this be something like this? Also on the TryFrom (patch 2/4).
>
> /// // `repr(C)` enums are not allowed.
> /// #[derive(Into)]
> /// #[repr(C)]
> /// enum Foo {
> /// A,
> /// B,
> /// }

Nice catch, I'll buffer the fix until I get some more feedback.

Thanks for taking a look!

Best regards,
Jesung