Suggest adding an array length if possible#100590
Merged
bors merged 2 commits intorust-lang:masterfrom Aug 16, 2022
Merged
Conversation
Contributor
|
r? @jackh726 (rust-highfive has picked a reviewer for you, use r? to override) |
Contributor
|
anyways r=me after nits are addressed or not @bors delegate+ |
Collaborator
|
✌️ @TaKO8Ki can now approve this pull request |
e15db88 to
12e609b
Compare
Member
Author
|
@bors r=compiler-errors |
Collaborator
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Aug 16, 2022
…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 | |||
Member
There was a problem hiding this comment.
Why are all errors in this file duplicated? For example this is and the one at line 28 has the same cause.
WaffleLapkin
reviewed
Sep 6, 2022
Member
WaffleLapkin
left a comment
There was a problem hiding this comment.
Annoyingly this also doesn't work with references to arrays, for example:
const REPORT_DESCR: &[u8; _] = &[1]won't trigger the suggestion.
GuillaumeGomez
added a commit
to GuillaumeGomez/rust
that referenced
this pull request
Sep 9, 2022
…h-to-ref-to-array, r=oli-obk Suggest adding array lengths to references to arrays if possible ref: rust-lang#100590 (review)
Dylan-DPC
added a commit
to Dylan-DPC/rust
that referenced
this pull request
Sep 9, 2022
…h-to-ref-to-array, r=oli-obk Suggest adding array lengths to references to arrays if possible ref: rust-lang#100590 (review)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes #100448