-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Suggest adding an array length if possible #100590
Conversation
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cool!
anyways r=me after nits are addressed or not @bors delegate+ |
✌️ @TaKO8Ki can now approve this pull request |
e15db88
to
12e609b
Compare
@bors r=compiler-errors |
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#100338 (when there are 3 or more return statements in the loop) - rust-lang#100384 (Add support for generating unique profraw files by default when using `-C instrument-coverage`) - rust-lang#100460 (Update the minimum external LLVM to 13) - rust-lang#100567 (Add missing closing quote) - rust-lang#100590 (Suggest adding an array length if possible) - rust-lang#100600 (Rename Machine memory hooks to suggest when they run) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
@@ -0,0 +1,48 @@ | |||
error: in expressions, `_` can only be used on the left-hand side of an assignment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are all errors in this file duplicated? For example this is and the one at line 28 has the same cause.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Annoyingly this also doesn't work with references to arrays, for example:
const REPORT_DESCR: &[u8; _] = &[1]
won't trigger the suggestion.
…h-to-ref-to-array, r=oli-obk Suggest adding array lengths to references to arrays if possible ref: rust-lang#100590 (review)
…h-to-ref-to-array, r=oli-obk Suggest adding array lengths to references to arrays if possible ref: rust-lang#100590 (review)
fixes #100448