Skip to content

[crater experiment] lint against Struct { .. } when Struct has all private fields - #159356

Draft
Jules-Bertholet wants to merge 3 commits into
rust-lang:mainfrom
Jules-Bertholet:crater-rest-test
Draft

[crater experiment] lint against Struct { .. } when Struct has all private fields#159356
Jules-Bertholet wants to merge 3 commits into
rust-lang:mainfrom
Jules-Bertholet:crater-rest-test

Conversation

@Jules-Bertholet

@Jules-Bertholet Jules-Bertholet commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

View all comments

Draft as this is just a Crater experiment, and should not be merged.

Deny-by-default lint on Struct { .. } patterns where Struct has only fields not visible from the location of the pattern (if it has no fields, it must be from a foreign crate and #[non_exhaustive]). This is to gather data to inform rust-lang/rfcs#3753.

@rustbot label A-patterns T-lang
@rustbot ready

r? compiler

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-patterns Relating to patterns and pattern matching T-lang Relevant to the language team 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 Jul 15, 2026
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@mati865

mati865 commented Jul 16, 2026

Copy link
Copy Markdown
Member

Please describe what kind of crater run do you need: https://rustc-dev-guide.rust-lang.org/tests/crater.html#requesting-crater-runs
Looks like a check-only to me.

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 16, 2026
[crater experiment] lint against `Struct { .. }` when `Struct` has all private fields
@Jules-Bertholet

Copy link
Copy Markdown
Contributor Author

Yes, check-only

@rust-bors rust-bors Bot 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 Jul 16, 2026
@rust-bors

rust-bors Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 86531a3 failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@mati865

mati865 commented Jul 17, 2026

Copy link
Copy Markdown
Member

@Jules-Bertholet the toolchain must be buildable to run crater.

@rustbot rustbot added the A-attributes Area: Attributes (`#[…]`, `#![…]`) label Jul 19, 2026
@Jules-Bertholet

Copy link
Copy Markdown
Contributor Author

@rustbot ready
@rustbot label -A-attributes

@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. A-attributes Area: Attributes (`#[…]`, `#![…]`) labels Jul 19, 2026
@theemathas

Copy link
Copy Markdown
Contributor

@bors try

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 19, 2026
[crater experiment] lint against `Struct { .. }` when `Struct` has all private fields
@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job aarch64-gnu-llvm-21-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)
  |
  = note: using it is strongly discouraged
  = note: `#[warn(internal_features)]` on by default

error: crater fail !! problematic pattern detected !!
    --> compiler/rustc_lint/src/builtin.rs:3214:9
     |
3214 |         Foo { .. } => (),
     |         ^^^^^^^^^^
     |

@theemathas

Copy link
Copy Markdown
Contributor

@Jules-Bertholet

@Jules-Bertholet

Copy link
Copy Markdown
Contributor Author

Test failures don't matter for crater, it just needs to build

@theemathas

Copy link
Copy Markdown
Contributor

Oh, sorry. My bad.

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

🚨 Error: missing start toolchain

🆘 If you have any trouble with Crater please ask in t-infra on Zulip
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@theemathas

Copy link
Copy Markdown
Contributor

Oh whoops. I need to wait for the try build to finish first. Duh.

@rust-bors

rust-bors Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 6e4b95e (6e4b95ed0735c3bbfb308e6f158f479b4d14f1aa)
Base parent: eff8269 (eff8269f797067c30555e77f160ec84c0ed15cd9)

@theemathas

Copy link
Copy Markdown
Contributor

@craterbot check

@craterbot

Copy link
Copy Markdown
Collaborator

👌 Experiment pr-159356 created and queued.
🤖 Automatically detected try build 6e4b95e
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 19, 2026
@rust-bors

rust-bors Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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

@craterbot

Copy link
Copy Markdown
Collaborator

🚧 Experiment pr-159356 is now running

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot

Copy link
Copy Markdown
Collaborator

🎉 Experiment pr-159356 is completed!
📊 174 regressed and 9 fixed (1035365 total)
📊 6818 spurious results on the retry-regressed-list.txt, consider a retry1 if this is a significant amount.
📰 Open the summary report.

⚠️ If you notice any spurious failure please add them to the denylist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

Footnotes

  1. re-run the experiment with crates=https://crater-reports.s3.amazonaws.com/pr-159356/retry-regressed-list.txt

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Aug 5, 2026
@mati865

mati865 commented Aug 5, 2026

Copy link
Copy Markdown
Member

@rustbot author

@rustbot rustbot 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 Aug 5, 2026
@rustbot

rustbot commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-patterns Relating to patterns and pattern matching S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants