Skip to content

generate code using fqt for bool#134

Merged
ModProg merged 4 commits into
mainfrom
generate-code-using-fqt-for-bool
Dec 19, 2025
Merged

generate code using fqt for bool#134
ModProg merged 4 commits into
mainfrom
generate-code-using-fqt-for-bool

Conversation

@ModProg

@ModProg ModProg commented Nov 18, 2025

Copy link
Copy Markdown
Owner

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

@daxpedda daxpedda left a comment

Copy link
Copy Markdown
Collaborator

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 ...

Comment thread tests/discriminant.rs Outdated
#[repr(C)]
enum Test {
A = isize::MAX - 2,
A = (u32::MAX - 2) as isize,

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Yeah, as this is only tests, we could just disable the lint

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Yeah, as this is only tests, we could just disable the lint

@daxpedda daxpedda Dec 16, 2025

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Lint? Is there a lint warning against using isize here or whats going on?

(sorry for the late response)

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Comment thread tests/discriminant.rs Outdated
@ModProg ModProg force-pushed the generate-code-using-fqt-for-bool branch from 581cf1e to 5bf2cc0 Compare December 19, 2025 22:53
@ModProg ModProg force-pushed the generate-code-using-fqt-for-bool branch from 00929b3 to 1382193 Compare December 19, 2025 23:04
@ModProg ModProg force-pushed the generate-code-using-fqt-for-bool branch from 1382193 to 84d71e2 Compare December 19, 2025 23:06
@ModProg ModProg merged commit 0642661 into main Dec 19, 2025
98 checks passed
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

2 participants