Skip to content

Check FnPtr/FnDef built-in fn traits correctly with effects #119023

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

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

compiler-errors
Copy link
Member

  1. Teach the (old) trait solver how to handle the constness for built-in impls of the Fn* family of traits. This unfortunately doesn't support const closures just yet.
  2. Fix the const_eval_select. It turns out that the where clause bounds on const_eval_select force the effect parameter for both fndefs to be true -- with effects, we will leave off any explicit where clauses and register these obligations manually.

I can elaborate on (2.) if you think it needs a better explanation!

r? fee1-dead

@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 16, 2023
@compiler-errors compiler-errors changed the title Fn trait constness Check FnPtr/FnDef built-in fn traits correctly with effects Dec 16, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 16, 2023

Could not assign reviewer from: fee1-dead.
User(s) fee1-dead are either the PR author, already assigned, or on vacation, and there are no other candidates.
Use r? to specify someone else to assign.

@rust-log-analyzer

This comment has been minimized.

Copy link
Member

@fee1-dead fee1-dead left a comment

Choose a reason for hiding this comment

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

Thanks, r=me after addressing the nits

@fee1-dead fee1-dead 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 Dec 18, 2023
@compiler-errors
Copy link
Member Author

@bors r=fee1-dead

@bors
Copy link
Collaborator

bors commented Dec 18, 2023

📌 Commit faea6ad has been approved by fee1-dead

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-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Dec 18, 2023
@bors
Copy link
Collaborator

bors commented Dec 18, 2023

⌛ Testing commit faea6ad with merge 3f28fe1...

@bors
Copy link
Collaborator

bors commented Dec 18, 2023

☀️ Test successful - checks-actions
Approved by: fee1-dead
Pushing 3f28fe1 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 18, 2023
@bors bors merged commit 3f28fe1 into rust-lang:master Dec 18, 2023
@rustbot rustbot added this to the 1.76.0 milestone Dec 18, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3f28fe1): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

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

Max RSS (memory usage)

Results

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)
3.3% [3.3%, 3.3%] 1
Regressions ❌
(secondary)
1.0% [1.0%, 1.1%] 3
Improvements ✅
(primary)
-0.8% [-1.2%, -0.6%] 3
Improvements ✅
(secondary)
-3.6% [-3.6%, -3.6%] 1
All ❌✅ (primary) 0.2% [-1.2%, 3.3%] 4

Cycles

Results

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.5% [0.5%, 0.6%] 2
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-1.6% [-1.8%, -1.5%] 2
All ❌✅ (primary) 0.5% [0.5%, 0.6%] 2

Binary size

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

Bootstrap: 674.217s -> 673.523s (-0.10%)
Artifact size: 312.46 MiB -> 312.51 MiB (0.01%)

@compiler-errors compiler-errors deleted the fn-trait-constness branch January 7, 2024 21:07
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.

6 participants