Skip to content

Conversation

veera-sivarajan
Copy link
Contributor

@veera-sivarajan veera-sivarajan commented Jul 23, 2024

Fixes #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

@rustbot
Copy link
Collaborator

rustbot commented Jul 23, 2024

r? @petrochenkov

rustbot has assigned @petrochenkov.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 23, 2024
@rust-log-analyzer

This comment has been minimized.

@petrochenkov
Copy link
Contributor

r? compiler

@rustbot rustbot assigned fmease and unassigned petrochenkov Jul 24, 2024
@bors
Copy link
Collaborator

bors commented Jul 29, 2024

☔ The latest upstream changes (presumably #125443) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@veera-sivarajan
Copy link
Contributor Author

@fmease friendly bump

@veera-sivarajan
Copy link
Contributor Author

r? compiler

@rustbot rustbot assigned cjgillot and unassigned fmease Oct 5, 2024
Copy link
Member

@fmease fmease left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, let me post what I had pending

@bors
Copy link
Collaborator

bors commented Oct 15, 2024

☔ The latest upstream changes (presumably #131724) made this pull request unmergeable. Please resolve the merge conflicts.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@cjgillot cjgillot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 27, 2024
@Dylan-DPC Dylan-DPC added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Nov 4, 2024
@cjgillot
Copy link
Contributor

cjgillot commented Jan 8, 2025

Thanks for your patience.
@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jan 8, 2025

📌 Commit 98cc345 has been approved by cjgillot

It is now in the queue for this repository.

@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 Jan 8, 2025
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
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
@bors bors merged commit e4e2d9c into rust-lang:master Jan 9, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Jan 9, 2025
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
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.

Detect ; -> , typo on vec!["_", 10]
8 participants