Skip to content

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Mar 25, 2022

Suggests a fix in cases like:

- const A: [i32; 1] = { 1 };

+ const A: [i32; 1] = [ 1 ];
                      ^   ^

Also edit the message for the same suggestion in the parser (e.g. { 1, 2 }).

Fixes #95289

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 25, 2022
@rust-highfive
Copy link
Contributor

r? @davidtwco

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 25, 2022
@davidtwco
Copy link
Member

@bors r+

@bors
Copy link
Collaborator

bors commented Apr 1, 2022

📌 Commit 91ac9cf has been approved by davidtwco

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 1, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 1, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#95032 (Clean up, categorize and sort unstable features in std.)
 - rust-lang#95260 (Better suggestions for `Fn`-family trait selection errors)
 - rust-lang#95293 (suggest wrapping single-expr blocks in square brackets)
 - rust-lang#95344 (Make `impl Debug for rustdoc::clean::Item` easier to read)
 - rust-lang#95388 (interpret: make isize::MAX the limit for dynamic value sizes)
 - rust-lang#95530 (rustdoc: do not show primitives and keywords as private)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 8f493fd into rust-lang:master Apr 1, 2022
@rustbot rustbot added this to the 1.61.0 milestone Apr 1, 2022
@compiler-errors compiler-errors deleted the braces branch April 7, 2022 04:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Account for {} when array literal [] was meant
5 participants