Skip to content

Check for constant expression in useless_vec lint #1068

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
Jul 3, 2016

Conversation

AtheMathmo
Copy link
Contributor

This PR resolves issue #1063 .

The PR includes a new check on the length expression - ensuring that it is a constant expression. It also adds new tests to the compile-fail suite for vec.rs. These tests check the length against a struct field and method.

@mcarton mcarton merged commit 5d6e4a6 into rust-lang:master Jul 3, 2016
@mcarton
Copy link
Member

mcarton commented Jul 3, 2016

Thanks!

@mcarton
Copy link
Member

mcarton commented Jul 3, 2016

By the way, tip for the next time (there will be a next time right? 😄): for GitHub to understand that a PR resolves an issue, it needs a very specific vocabulary.

@AtheMathmo
Copy link
Contributor Author

Thanks for the tip!

And yes I think there will be a next time. I'll be on the look out for a few more easy bugs :)

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