-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Give VariantData::Struct
named fields, to clairfy recovered
.
#119145
Give VariantData::Struct
named fields, to clairfy recovered
.
#119145
Conversation
Some changes occurred in src/tools/rustfmt cc @rust-lang/rustfmt Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
src/tools/rustfmt/src/items.rs
Outdated
@@ -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( |
There was a problem hiding this comment.
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...
src/tools/rustfmt/src/items.rs
Outdated
@@ -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( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ast::VariantData::Tuple(..) | ast::VariantData::Struct{..} => format_struct( | |
ast::VariantData::Tuple(..) | ast::VariantData::Struct { .. } => format_struct( |
There was a problem hiding this comment.
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.
There was a problem hiding this 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
1940436
to
67fdabd
Compare
This comment has been minimized.
This comment has been minimized.
67fdabd
to
bb05f91
Compare
This comment has been minimized.
This comment has been minimized.
hint: |
bb05f91
to
1133780
Compare
@bors r=compiler-errors rollup |
…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
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`
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