Skip to content

Use built-in comparisons for range matching in MIR #30641

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

Merged
merged 2 commits into from
Dec 31, 2015
Merged

Use built-in comparisons for range matching in MIR #30641

merged 2 commits into from
Dec 31, 2015

Conversation

solson
Copy link
Member

@solson solson commented Dec 30, 2015

The previous version using PartialOrd::le was broken since it passed T arguments where &T was expected.

It makes sense to use primitive comparisons since range patterns can only be used with chars and numeric types.

r? @eddyb

The previous version using `PartialOrd::le` was broken since it passed `T`
arguments where `&T` was expected.

It makes sense to use primitive comparisons since range patterns can only be
used with chars and numeric types.
@eddyb
Copy link
Member

eddyb commented Dec 30, 2015

@bors r+

@bors
Copy link
Collaborator

bors commented Dec 30, 2015

📌 Commit 78526fc has been approved by eddyb

bors added a commit that referenced this pull request Dec 31, 2015
The previous version using `PartialOrd::le` was broken since it passed `T` arguments where `&T` was expected.

It makes sense to use primitive comparisons since range patterns can only be used with chars and numeric types.

r? @eddyb
@bors
Copy link
Collaborator

bors commented Dec 31, 2015

⌛ Testing commit 78526fc with merge 7f3201d...

@bors bors merged commit 78526fc into rust-lang:master Dec 31, 2015
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.

3 participants