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

Fix tests. #1873

Merged
merged 2 commits into from
Jul 5, 2017
Merged

Fix tests. #1873

merged 2 commits into from
Jul 5, 2017

Conversation

oxalica
Copy link
Contributor

@oxalica oxalica commented Jul 5, 2017

Fix #1872.

@@ -29,7 +21,4 @@ fn main() {
let v2 = vec![4,5];
let _x = v1.iter().zip(0..v1.len());
let _y = v1.iter().zip(0..v2.len()); // No error

// check const eval
let _ = v1.iter().step_by(2/3);
Copy link
Contributor

Choose a reason for hiding this comment

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

You should leave these in, since they use the Iterator::step_by feature

Copy link
Contributor

Choose a reason for hiding this comment

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

Sorry, that wasn't very clear... I meant to leave all the calls to step_by in the tests. At least those that compile.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I want to do so, but directly passing -1 or 0 to step_by causes a compile error immediately, which will suppress the clippy warnings. I don't think that's what we expected.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm sorry for it. step_by(0) in tests is ok. I'll put them back.

@oli-obk
Copy link
Contributor

oli-obk commented Jul 5, 2017

Great! Thanks.

@oli-obk oli-obk merged commit f7dd769 into rust-lang:master Jul 5, 2017
@oxalica oxalica deleted the fix-tests branch July 5, 2017 10:28
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