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

Turn remaining non-structural-const-in-pattern lints into hard errors #124661

Merged
merged 2 commits into from
May 26, 2024

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented May 3, 2024

This completes the implementation of #120362 by turning our remaining future-compat lints into hard errors: indirect_structural_match and pointer_structural_match.

They have been future-compat lints for a while (indirect_structural_match for many years, pointer_structural_match since Rust 1.75 (released Dec 28, 2023)), and have shown up in dependency breakage reports since Rust 1.78 (just released on May 2, 2024). I don't expect a lot of code will still depend on them, but we will of course do a crater run.

A lot of cleanup is now possible in const_to_pat, but that is deferred to a later PR.

Fixes #70861

@rustbot
Copy link
Collaborator

rustbot commented May 3, 2024

r? @pnkfelix

rustbot has assigned @pnkfelix.
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 May 3, 2024
@rustbot
Copy link
Collaborator

rustbot commented May 3, 2024

Some changes occurred in match checking

cc @Nadrieril

@RalfJung RalfJung changed the title Only structural consts in patterns Only allow structural consts in patterns May 3, 2024
@RalfJung RalfJung changed the title Only allow structural consts in patterns Turn remaining non-structural-const-in-pattern lints into hard errors May 3, 2024
@RalfJung RalfJung force-pushed the only-structural-consts-in-patterns branch from 6ef7b3c to cbd682b Compare May 3, 2024 13:57
@RalfJung
Copy link
Member Author

RalfJung commented May 3, 2024

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request May 3, 2024
…atterns, r=<try>

Turn remaining non-structural-const-in-pattern lints into hard errors

This completes the implementation of rust-lang#120362 by turning out remaining future-compat lints into hard errors: indirect_structural_match and pointer_structural_match.

They have been future-compat lints for a while (indirect_structural_match for many years, pointer_structural_match since Rust 1.75), and have shown up in dependency breakage reports since Rust 1.78 (released yesterday). I don't expect any code will still depend on them, but we will of course do a crater run.

A lot of cleanup is now possible in const_to_pat, but that is deferred to a later PR.

Fixes rust-lang#70861
@bors
Copy link
Contributor

bors commented May 3, 2024

⌛ Trying commit cbd682b with merge 8348c7b...

@bors
Copy link
Contributor

bors commented May 3, 2024

☀️ Try build successful - checks-actions
Build commit: 8348c7b (8348c7b12e5a2c6b3311d00662c71e8ceda0a1c8)

@RalfJung
Copy link
Member Author

RalfJung commented May 3, 2024

@craterbot check

@craterbot
Copy link
Collaborator

👌 Experiment pr-124661 created and queued.
🤖 Automatically detected try build 8348c7b
🔍 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 May 3, 2024
@craterbot
Copy link
Collaborator

🚧 Experiment pr-124661 is now running

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

@craterbot
Copy link
Collaborator

🎉 Experiment pr-124661 is completed!
📊 23 regressed and 2 fixed (445552 total)
📰 Open the full report.

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

@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 May 9, 2024
@RalfJung
Copy link
Member Author

RalfJung commented May 9, 2024

Many of these are caused by -D renamed-and-removed-lints. (Not sure where that flag comes from, does crater set it? That wouldn't make sense...)

On crates.io we have two true regression:

The github failures are either false positives, duplicates of one of these crates, or advent of code repos.

I think we can go ahead and land this. (Remember, if it lands now crate authors still have until July 25th before this hits stable.) Nominating for t-lang.

@RalfJung RalfJung added T-lang Relevant to the language team, which will review and decide on the PR/issue. I-lang-nominated Nominated for discussion during a lang team meeting. relnotes Marks issues that should be documented in the release notes of the next release. labels May 9, 2024
@pnkfelix
Copy link
Member

Oh noes, it doesn't sequence the commands to remove the label before firing off the rfcbot command!

@rfcbot cancel

@rfcbot
Copy link

rfcbot commented May 14, 2024

@pnkfelix proposal cancelled.

@rfcbot rfcbot removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels May 14, 2024
@pnkfelix
Copy link
Member

@rfcbot fcp merge

(I'm just preemptively firing up a T-lang FCP to approve this change.)

@rfcbot
Copy link

rfcbot commented May 14, 2024

Team member @pnkfelix has proposed to merge this. The next step is review by the rest of the tagged team members:

No concerns currently listed.

Once a majority of reviewers approve (and at most 2 approvals are outstanding), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up!

cc @rust-lang/lang-advisors: FCP proposed for lang, please feel free to register concerns.
See this document for info about what commands tagged team members can give me.

@rfcbot rfcbot added proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. labels May 14, 2024
@nikomatsakis
Copy link
Contributor

nikomatsakis commented May 15, 2024 via email

@rfcbot rfcbot added final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. and removed proposed-final-comment-period Proposed to merge/close by relevant subteam, see T-<team> label. Will enter FCP once signed off. labels May 15, 2024
@rfcbot
Copy link

rfcbot commented May 15, 2024

🔔 This is now entering its final comment period, as per the review above. 🔔

@traviscross
Copy link
Contributor

@rustbot labels -I-lang-nominated

We discussed this in the triage meeting today, and it's now in FCP.

@rustbot rustbot removed the I-lang-nominated Nominated for discussion during a lang team meeting. label May 15, 2024
@rfcbot rfcbot added finished-final-comment-period The final comment period is finished for this PR / Issue. to-announce Announce this issue on triage meeting and removed final-comment-period In the final comment period and will be merged soon unless new substantive objections are raised. labels May 25, 2024
@rfcbot
Copy link

rfcbot commented May 25, 2024

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

This will be merged soon.

@RalfJung
Copy link
Member Author

@pnkfelix wrote

The code itself seems fine

@bors r=pnkfelix

@bors
Copy link
Contributor

bors commented May 26, 2024

📌 Commit cbd682b has been approved by pnkfelix

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-team Status: Awaiting decision from the relevant subteam (see the T-<team> label). labels May 26, 2024
@bors
Copy link
Contributor

bors commented May 26, 2024

⌛ Testing commit cbd682b with merge 5fe5543...

@bors
Copy link
Contributor

bors commented May 26, 2024

☀️ Test successful - checks-actions
Approved by: pnkfelix
Pushing 5fe5543 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 26, 2024
@bors bors merged commit 5fe5543 into rust-lang:master May 26, 2024
7 checks passed
@rustbot rustbot added this to the 1.80.0 milestone May 26, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (5fe5543): comparison URL.

Overall result: ❌ regressions - no action needed

@rustbot label: -perf-regression

Instruction count

This is a highly reliable metric that was used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
1.2% [0.3%, 2.1%] 2
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Max RSS (memory usage)

Results (primary -0.2%, secondary 0.3%)

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.9% [1.9%, 1.9%] 1
Regressions ❌
(secondary)
4.2% [4.2%, 4.2%] 1
Improvements ✅
(primary)
-1.3% [-2.0%, -0.5%] 2
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) -0.2% [-2.0%, 1.9%] 3

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 671.39s -> 670.355s (-0.15%)
Artifact size: 315.55 MiB -> 315.71 MiB (0.05%)

@RalfJung RalfJung deleted the only-structural-consts-in-patterns branch May 28, 2024 08:23
@apiraino apiraino removed the to-announce Announce this issue on triage meeting label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disposition-merge This issue / PR is in PFCP or FCP with a disposition to merge it. finished-final-comment-period The final comment period is finished for this PR / Issue. merged-by-bors This PR was explicitly merged by bors. relnotes Marks issues that should be documented in the release notes of the next release. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

function pointers as match patterns have optimization-dependent behavior
10 participants