Skip to content

Conversation

aDotInTheVoid
Copy link
Member

Implements #119121 (comment). Supersedes #119121

This way, it's clear what the bool fields means, instead of having to find where it's generated. Changes both ast and hir.

r? @compiler-errors

@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 Dec 19, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 19, 2023

Some changes occurred in src/tools/rustfmt

cc @rust-lang/rustfmt

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@rust-log-analyzer

This comment has been minimized.

@@ -666,7 +666,7 @@ impl<'a> FmtVisitor<'a> {
let span = mk_sp(lo, field.span.lo());

let variant_body = match field.data {
ast::VariantData::Tuple(..) | ast::VariantData::Struct(..) => format_struct(
ast::VariantData::Tuple(..) | ast::VariantData::Struct{..} => format_struct(
Copy link
Member

Choose a reason for hiding this comment

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

I wonder if this will fail the rustfmt test where it tries to format itself...

@@ -666,7 +666,7 @@ impl<'a> FmtVisitor<'a> {
let span = mk_sp(lo, field.span.lo());

let variant_body = match field.data {
ast::VariantData::Tuple(..) | ast::VariantData::Struct(..) => format_struct(
ast::VariantData::Tuple(..) | ast::VariantData::Struct{..} => format_struct(
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
ast::VariantData::Tuple(..) | ast::VariantData::Struct{..} => format_struct(
ast::VariantData::Tuple(..) | ast::VariantData::Struct { .. } => format_struct(

Copy link
Member Author

Choose a reason for hiding this comment

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

Weird that the tidy pre-push hook didn't catch this.

Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

r=me if ci is green

@rust-cloud-vms rust-cloud-vms bot force-pushed the variantdata-struct-struct branch from 1940436 to 67fdabd Compare December 19, 2023 23:03
@rust-log-analyzer

This comment has been minimized.

@rust-cloud-vms rust-cloud-vms bot force-pushed the variantdata-struct-struct branch from 67fdabd to bb05f91 Compare December 19, 2023 23:47
@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

hint: ./x.py check is your friend

@rust-cloud-vms rust-cloud-vms bot force-pushed the variantdata-struct-struct branch from bb05f91 to 1133780 Compare December 20, 2023 00:07
@aDotInTheVoid
Copy link
Member Author

@bors r=compiler-errors rollup

@bors
Copy link
Collaborator

bors commented Dec 20, 2023

📌 Commit 1133780 has been approved by compiler-errors

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 Dec 20, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Dec 21, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#119135 (Fix crash due to `CrateItem::kind()` not handling constructors)
 - rust-lang#119141 (Add method to get instance instantiation arguments)
 - rust-lang#119145 (Give `VariantData::Struct`  named fields, to clairfy `recovered`.)
 - rust-lang#119167 (E0761: module directory has .rs suffix)
 - rust-lang#119168 (resolve: Stop feeding visibilities for import list stems)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit d0d814f into rust-lang:master Dec 21, 2023
@rustbot rustbot added this to the 1.76.0 milestone Dec 21, 2023
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 21, 2023
Rollup merge of rust-lang#119145 - aDotInTheVoid:variantdata-struct-struct, r=compiler-errors

Give `VariantData::Struct`  named fields, to clairfy `recovered`.

Implements rust-lang#119121 (comment). Supersedes rust-lang#119121

This way, it's clear what the bool fields means, instead of having to find where it's generated. Changes both ast and hir.

r? `@compiler-errors`
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.

5 participants