Skip to content

clang::Type::num_template_args return Option<u32> fix #135 #171

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 1 commit into from
Oct 31, 2016

Conversation

jeanphilippeD
Copy link
Contributor

Fix #135

@highfive
Copy link

warning Warning warning

  • These commits modify unsafe code. Please review it carefully!

Copy link
Contributor

@emilio emilio left a comment

Choose a reason for hiding this comment

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

The rest looks awesome, thanks!

if n >= 0 {
Some(n as u32)
} else {
assert!(n==-1);
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: spacing is odd here (n == -1), but it'd be better if you do assert_eq!(n, -1), or even better debug_assert_eq!(n, -1) so it gets compiled out in release builds.

@emilio
Copy link
Contributor

emilio commented Oct 31, 2016

@bors-servo r+

@bors-servo
Copy link

📌 Commit 7cc08b1 has been approved by emilio

@bors-servo
Copy link

⌛ Testing commit 7cc08b1 with merge 724aa06...

bors-servo pushed a commit that referenced this pull request Oct 31, 2016
clang::Type::num_template_args return Option<u32> fix #135

Fix #135
@bors-servo
Copy link

☀️ Test successful - status-travis

@bors-servo bors-servo merged commit 7cc08b1 into rust-lang:master Oct 31, 2016
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.

4 participants