Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regex-lite: fix compilation of doctests on 32-bit architectures #1101

Merged
merged 1 commit into from Oct 10, 2023
Merged

regex-lite: fix compilation of doctests on 32-bit architectures #1101

merged 1 commit into from Oct 10, 2023

Conversation

decathorpe
Copy link
Contributor

This is a followup for #1041. Returning early on non-64-bit architectures is not enough in this case, since the doctest actually fails to compile due to two numeric literals being too large for usize on 32-bit architectures.

With this change, "lib" and "doc" tests for the the regex-lite crate pass on all CPU architectures that I have access to.

Returning early on non-64-bit architectures is not enough, since the
doctest failed to compile due to two numeric literals being too large
for usize on 32-bit architectures.
Copy link
Member

@BurntSushi BurntSushi left a comment

Choose a reason for hiding this comment

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

Hah, oh man, this is rough. We'll see how this goes, but I really really loathe these sorts of hacks to get doc tests working. Especially when I can't test them in CI.

But happy to play along for now and try out this whack-a-mole approach. Thank you!!!

@BurntSushi BurntSushi merged commit f5b8cb4 into rust-lang:master Oct 10, 2023
16 checks passed
@BurntSushi
Copy link
Member

This PR is on crates.io in regex-lite 0.1.3.

@decathorpe
Copy link
Contributor Author

Yeah, I agree that this is not ideal :( Thanks for merging + the new release!

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.

None yet

2 participants