Skip to content

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

2 participants