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

check_consts: fix error requesting feature gate when that gate is not actually needed #132992

Merged
merged 1 commit into from
Nov 15, 2024

Conversation

RalfJung
Copy link
Member

When working on rust-lang/hashbrown#586 I noticed that the compiler asks for the rustc_private feature to be enabled if one forgets to set rustc_const_stable_indirect on a function -- but enabling rustc_private would not actually help. This fixes the diagnostics.

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 Nov 13, 2024
@rustbot
Copy link
Collaborator

rustbot commented Nov 13, 2024

Some changes occurred to the CTFE machinery

cc @rust-lang/wg-const-eval

@@ -1,6 +1,6 @@
//@ compile-flags: -Zforce-unstable-if-unmarked
//@ edition: 2021
#![feature(const_async_blocks, rustc_attrs, rustc_private)]
#![feature(const_async_blocks, rustc_attrs)]
Copy link
Member Author

Choose a reason for hiding this comment

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

Without this PR, removing rustc_private here would have completely changed the output. So the point of the PR is that even without rustc_private, the output here is as before: suggesting rustc_const_stable_indirect on the callee.

@compiler-errors
Copy link
Member

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 15, 2024

📌 Commit 9760983 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 Nov 15, 2024
@bors
Copy link
Contributor

bors commented Nov 15, 2024

⌛ Testing commit 9760983 with merge ce40196...

@bors
Copy link
Contributor

bors commented Nov 15, 2024

☀️ Test successful - checks-actions
Approved by: compiler-errors
Pushing ce40196 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Nov 15, 2024
@bors bors merged commit ce40196 into rust-lang:master Nov 15, 2024
7 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 15, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (ce40196): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -perf-regression

Instruction count

This is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.

mean range count
Regressions ❌
(primary)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.0% [-0.0%, -0.0%] 1
Improvements ✅
(secondary)
-0.1% [-0.1%, -0.1%] 1
All ❌✅ (primary) -0.0% [-0.0%, -0.0%] 1

Max RSS (memory usage)

Results (primary -5.1%)

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-5.1% [-6.9%, -3.3%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -5.1% [-6.9%, -3.3%] 2

Cycles

Results (primary -2.1%, secondary -1.8%)

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)
- - 0
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-2.1% [-2.2%, -2.0%] 2
Improvements ✅
(secondary)
-1.8% [-2.1%, -1.5%] 2
All ❌✅ (primary) -2.1% [-2.2%, -2.0%] 2

Binary size

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

Bootstrap: 786.926s -> 786.906s (-0.00%)
Artifact size: 335.38 MiB -> 335.30 MiB (-0.02%)

@RalfJung RalfJung deleted the check-consts-feature-gate branch November 16, 2024 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. 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