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

Float infer #3940

Closed
wants to merge 2 commits into from
Closed

Float infer #3940

wants to merge 2 commits into from

Conversation

pcwalton
Copy link
Contributor

@pcwalton pcwalton commented Nov 8, 2012

r? @nikomatsakis (last commit only)

@pcwalton
Copy link
Contributor Author

pcwalton commented Nov 8, 2012

r? @nikomatsakis for the floating point literal inference commit

@pcwalton pcwalton closed this Nov 13, 2012
RalfJung pushed a commit to RalfJung/rust that referenced this pull request Oct 5, 2024
Prefer refutable slice patterns over len check + index op

Just something I noticed while reviewing other PRs

We do it for shim arguments almost everywhere, but when the size is not statically known, we didn't use the helpers as they rely on array ops. But we can avoid a len check followed by several index ops by just using a refutable slice pattern with `let else`.

The pattern is so common, it seems almost worth a dedicated macro
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