Skip to content
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 { .. } around a const function call with arguments #94731

Merged
merged 8 commits into from
Mar 18, 2022

Conversation

TaKO8Ki
Copy link
Member

@TaKO8Ki TaKO8Ki commented Mar 8, 2022

closes #91020

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

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 8, 2022
@TaKO8Ki TaKO8Ki marked this pull request as ready for review March 8, 2022 08:21
@TaKO8Ki TaKO8Ki marked this pull request as draft March 8, 2022 08:25
@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

Improvement looks good, some minor comments and the CI failure to fix.

compiler/rustc_parse/src/parser/path.rs Outdated Show resolved Hide resolved
compiler/rustc_parse/src/parser/path.rs Outdated Show resolved Hide resolved
compiler/rustc_parse/src/parser/path.rs Outdated Show resolved Hide resolved
@rust-log-analyzer

This comment has been minimized.

@davidtwco davidtwco 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 Mar 9, 2022
@TaKO8Ki TaKO8Ki force-pushed the const-generic-expr-recovery branch from 7dffd49 to 527b1f3 Compare March 9, 2022 04:00
@TaKO8Ki TaKO8Ki marked this pull request as ready for review March 9, 2022 04:09
@TaKO8Ki
Copy link
Member Author

TaKO8Ki commented Mar 9, 2022

@rustbot ready

@rustbot rustbot 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 Mar 9, 2022
@TaKO8Ki TaKO8Ki requested a review from davidtwco March 9, 2022 06:00
compiler/rustc_parse/src/parser/path.rs Outdated Show resolved Hide resolved
@TaKO8Ki TaKO8Ki force-pushed the const-generic-expr-recovery branch from 6e1378a to 192acb4 Compare March 9, 2022 07:04
@TaKO8Ki TaKO8Ki force-pushed the const-generic-expr-recovery branch from 9483b54 to 3ded252 Compare March 9, 2022 14:13
@TaKO8Ki TaKO8Ki requested a review from davidtwco March 9, 2022 15:00
Copy link
Member

@davidtwco davidtwco left a comment

Choose a reason for hiding this comment

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

This looks good, thanks for making these changes, I've left a few more comments.

compiler/rustc_parse/src/parser/diagnostics.rs Outdated Show resolved Hide resolved
compiler/rustc_parse/src/parser/diagnostics.rs Outdated Show resolved Hide resolved
compiler/rustc_parse/src/parser/diagnostics.rs Outdated Show resolved Hide resolved
compiler/rustc_parse/src/parser/path.rs Outdated Show resolved Hide resolved
@TaKO8Ki TaKO8Ki requested a review from davidtwco March 10, 2022 15:57
@TaKO8Ki
Copy link
Member Author

TaKO8Ki commented Mar 17, 2022

r? @rust-lang/compiler

@rust-highfive rust-highfive assigned oli-obk and unassigned davidtwco Mar 17, 2022
@oli-obk
Copy link
Contributor

oli-obk commented Mar 17, 2022

@bors r=davidtwco,oli-obk

@bors
Copy link
Contributor

bors commented Mar 17, 2022

📌 Commit 9a65322 has been approved by davidtwco,oli-obk

@bors
Copy link
Contributor

bors commented Mar 17, 2022

🌲 The tree is currently closed for pull requests below priority 100. This pull request will be tested once the tree is reopened.

@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 Mar 17, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 18, 2022
Rollup of 10 pull requests

Successful merges:

 - rust-lang#91133 (Improve `unsafe` diagnostic)
 - rust-lang#93222 (Make ErrorReported impossible to construct outside `rustc_errors`)
 - rust-lang#93745 (Stabilize ADX target feature)
 - rust-lang#94309 ([generator_interior] Be more precise with scopes of borrowed places)
 - rust-lang#94698 (Remove redundant code from copy-suggestions)
 - rust-lang#94731 (Suggest adding `{ .. }` around a const function call with arguments)
 - rust-lang#94960 (Fix many spelling mistakes)
 - rust-lang#94982 (Add deprecated_safe feature gate and attribute, cc rust-lang#94978)
 - rust-lang#94997 (debuginfo: Fix ICE when generating name for type that produces a layout error.)
 - rust-lang#95000 (Fixed wrong type name in comment)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 5eb3433 into rust-lang:master Mar 18, 2022
@rustbot rustbot added this to the 1.61.0 milestone Mar 18, 2022
@TaKO8Ki TaKO8Ki deleted the const-generic-expr-recovery branch March 18, 2022 07:01
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 18, 2022
…ostic, r=davidtwco

Use `Parser.create_snapshot_for_diagnostic` instead of `Parser.clone()`

Use [`create_snapshot_for_diagnostic`](https://github.com/rust-lang/rust/blob/cd119057160cedea245aa2679add56723f3dc784/compiler/rustc_parse/src/parser/diagnostics.rs#L214-L223) I implemented in rust-lang#94731 instead of `self.clone()` to avoid duplicate unclosed delims errors being emitted when the `Parser` is dropped.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Mar 23, 2022
…s-create-snapshot-for-diagnostic, r=Dylan-DPC

Replace `this.clone()` with `this.create_snapshot_for_diagnostic()`

Use [`create_snapshot_for_diagnostic`](https://github.com/rust-lang/rust/blob/cd119057160cedea245aa2679add56723f3dc784/compiler/rustc_parse/src/parser/diagnostics.rs#L214-L223) I implemented in rust-lang#94731 instead of `this.clone()` to avoid duplicate errors about unclosed delims being emitted when the `Parser` is dropped.
Dylan-DPC added a commit to Dylan-DPC/rust that referenced this pull request Jun 12, 2022
…gnostic-in-rustc-expand, r=Dylan-DPC

Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`

Use [`create_snapshot_for_diagnostic`](https://github.com/rust-lang/rust/blob/cd119057160cedea245aa2679add56723f3dc784/compiler/rustc_parse/src/parser/diagnostics.rs#L214-L223) I implemented in rust-lang#94731 instead of `clone` to avoid duplicate unclosed delims errors being emitted when the `Parser` is dropped. I missed this one in rust-lang#95068.
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 12, 2022
…ostic-in-rustc-expand, r=Dylan-DPC

Use `create_snapshot_for_diagnostic` instead of `clone` for `Parser`

Use [`create_snapshot_for_diagnostic`](https://github.com/rust-lang/rust/blob/cd119057160cedea245aa2679add56723f3dc784/compiler/rustc_parse/src/parser/diagnostics.rs#L214-L223) I implemented in rust-lang#94731 instead of `clone` to avoid duplicate unclosed delims errors being emitted when the `Parser` is dropped. I missed this one in rust-lang#95068.
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.

Suggest surrounding with braces when using a const function with arguments with const generics.
7 participants