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

vec::each() and each_mut() have bad return values. #6858

Closed
lilyball opened this issue May 31, 2013 · 2 comments
Closed

vec::each() and each_mut() have bad return values. #6858

lilyball opened this issue May 31, 2013 · 2 comments

Comments

@lilyball
Copy link
Contributor

vec::each() always returns true.

vec::each_mut() returns true if it broke, and false otherwise. From what I understand, this is backwards.

@nikomatsakis
Copy link
Contributor

I think both sound wrong? You should return false if you break, true otherwise.

@lilyball
Copy link
Contributor Author

lilyball commented Jun 1, 2013

Yes, I think both are wrong, which is why I listed both.

@sanxiyn sanxiyn closed this as completed Jun 4, 2013
flip1995 pushed a commit to flip1995/rust that referenced this issue Aug 11, 2022
More proc-macro detection

fixes rust-lang#6514
fixes rust-lang#8683
fixes rust-lang#6858
fixes rust-lang#6594

This is a more general way of checking if an expression comes from a macro and could be trivially applied to other lints. Ideally this would be fixed in rustc's proc-macro api, but I don't see that happening any time soon.

changelog: FPs: [`unit_arg`] [`default_trait_access`] [`missing_docs_in_private_items`]: No longer trigger in code generated from proc-macros.
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

No branches or pull requests

3 participants