Skip to content

Conversation

@ModProg
Copy link
Owner

@ModProg ModProg commented Nov 18, 2025

closes #133

@ModProg ModProg requested a review from daxpedda November 18, 2025 16:40
@ModProg ModProg force-pushed the generate-code-using-fqt-for-bool branch 3 times, most recently from 525c7f7 to e94ab4b Compare November 20, 2025 01:11
@ModProg ModProg force-pushed the generate-code-using-fqt-for-bool branch from e94ab4b to 0fa4f36 Compare November 24, 2025 21:23
@ModProg ModProg force-pushed the generate-code-using-fqt-for-bool branch from 0fa4f36 to cf14e42 Compare November 25, 2025 18:39
Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a changelog entry, otherwise looks good.

I'm yet again surprised what we have to account for in a proc-macro ...

#[repr(C)]
enum Test {
A = isize::MAX - 2,
A = (u32::MAX - 2) as isize,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because while we can use isize as a type, we are only allowed to use i32 values in future versions of rust with repr(C), I could probably simplify this by just using the value of i32::MAX directly

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should stick with isize until we get there, we also use isize internally, so we should test for that.

(on a side note: I'm doubtful this change will actually happen because it would break too much)

#[repr(C)]
enum Test {
A = -0x8000_0000_0000_0000_isize,
A = (-0x8000_0000_i32) as isize,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generated impls Are Using bool instead of ::core::primitive::bool

3 participants