Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions#128110
Merged
bors merged 2 commits intorust-lang:masterfrom Jan 9, 2025
Merged
Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions#128110bors merged 2 commits intorust-lang:masterfrom
bors merged 2 commits intorust-lang:masterfrom
Conversation
Collaborator
|
rustbot has assigned @petrochenkov. Use |
21132fb to
88be2cb
Compare
This comment has been minimized.
This comment has been minimized.
88be2cb to
14c4da1
Compare
Contributor
|
r? compiler |
Collaborator
|
☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts. |
14c4da1 to
d45665c
Compare
This comment has been minimized.
This comment has been minimized.
d45665c to
8550f05
Compare
Contributor
Author
|
@fmease friendly bump |
Contributor
Author
|
r? compiler |
fmease
requested changes
Oct 5, 2024
Member
fmease
left a comment
There was a problem hiding this comment.
Ah, let me post what I had pending
Collaborator
|
☔ The latest upstream changes (presumably #131724) made this pull request unmergeable. Please resolve the merge conflicts. |
8550f05 to
6404280
Compare
This comment has been minimized.
This comment has been minimized.
6404280 to
7042268
Compare
This comment has been minimized.
This comment has been minimized.
7042268 to
e4d32b6
Compare
This comment has been minimized.
This comment has been minimized.
e4d32b6 to
d982563
Compare
cjgillot
reviewed
Oct 27, 2024
d982563 to
4c43ae6
Compare
4c43ae6 to
98cc345
Compare
Contributor
|
Thanks for your patience. |
Collaborator
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this pull request
Jan 8, 2025
…gillot Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions Fixes rust-lang#80173 This PR detects typos in repeat expressions like `["_", 10]` and `vec![String::new(), 10]` and suggests replacing comma with semicolon. Also, improves code in other place by adding doc comments and making use of a helper function to check if a type implements `Clone`. References: 1. For `vec![T; N]`: https://doc.rust-lang.org/std/macro.vec.html 2. For `[T; N]`: https://doc.rust-lang.org/std/primitive.array.html
This was referenced Jan 8, 2025
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 9, 2025
…iaskrgr Rollup of 6 pull requests Successful merges: - rust-lang#128110 (Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions) - rust-lang#134609 (Add new `{x86_64,i686}-win7-windows-gnu` targets) - rust-lang#134875 (Implement `const Destruct` in old solver) - rust-lang#135221 (Include rustc and rustdoc book in replace-version-placeholder) - rust-lang#135231 (bootstrap: Add more comments to some of the test steps) - rust-lang#135256 (Move `mod cargo` below the import statements) Failed merges: - rust-lang#135195 (Make `lit_to_mir_constant` and `lit_to_const` infallible) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Jan 9, 2025
Rollup merge of rust-lang#128110 - veera-sivarajan:bugfix-80173, r=cjgillot Suggest Replacing Comma with Semicolon in Incorrect Repeat Expressions Fixes rust-lang#80173 This PR detects typos in repeat expressions like `["_", 10]` and `vec![String::new(), 10]` and suggests replacing comma with semicolon. Also, improves code in other place by adding doc comments and making use of a helper function to check if a type implements `Clone`. References: 1. For `vec![T; N]`: https://doc.rust-lang.org/std/macro.vec.html 2. For `[T; N]`: https://doc.rust-lang.org/std/primitive.array.html
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 #80173
This PR detects typos in repeat expressions like
["_", 10]andvec![String::new(), 10]and suggests replacing comma with semicolon.Also, improves code in other place by adding doc comments and making use of a helper function to check if a type implements
Clone.References:
vec![T; N]: https://doc.rust-lang.org/std/macro.vec.html[T; N]: https://doc.rust-lang.org/std/primitive.array.html