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

Switch to EarlyBinder for const_param_default and impl_trait_ref queries #106696

Merged
merged 6 commits into from
Jan 14, 2023

Conversation

kylematsuda
Copy link
Contributor

@kylematsuda kylematsuda commented Jan 10, 2023

Part of the work to close #105779 and implement rust-lang/types-team#78.

Several queries X have a bound_X variant that wraps the output in EarlyBinder. This PR adds EarlyBinder to the return type of const_param_default and impl_trait_ref, and removes their bound_X variants.

r? @lcnr

@rustbot
Copy link
Collaborator

rustbot commented Jan 10, 2023

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @lcnr (or someone else) soon.

Please see the contribution instructions for more information.

@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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jan 10, 2023
@jackh726
Copy link
Member

We can do this in parts, doesn't have to be a single PR.

compiler/rustc_hir_analysis/src/astconv/mod.rs Outdated Show resolved Hide resolved
compiler/rustc_hir_analysis/src/check/check.rs Outdated Show resolved Hide resolved
compiler/rustc_hir_analysis/src/coherence/orphan.rs Outdated Show resolved Hide resolved
compiler/rustc_middle/src/ty/mod.rs Outdated Show resolved Hide resolved
compiler/rustc_ty_utils/src/implied_bounds.rs Outdated Show resolved Hide resolved
src/librustdoc/passes/collect_intra_doc_links.rs Outdated Show resolved Hide resolved
@lcnr
Copy link
Contributor

lcnr commented Jan 11, 2023

But yeah, as said by @jackh726, the change is big enough that doing it for each query (or a few small ones together) separately in different PRs is probably a better idea to both make reviews easier and to prevent merge conflicts.

@kylematsuda kylematsuda changed the title [WIP] Switch to EarlyBinder as default Switch to EarlyBinder for const_param_default and impl_trait_ref queries Jan 11, 2023
@kylematsuda
Copy link
Contributor Author

@jackh726 and @lcnr: Thanks, that sounds good. I updated the title and description to reduce the scope of this PR to just the two queries that are already included here.

@lcnr, thanks for the review and the detailed explanations! Tbh I'm not surprised that I got a lot of them wrong, hopefully after studying your explanations I will do slightly better on the next batch 😬

@rustbot rustbot added the T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) label Jan 11, 2023
@bors
Copy link
Contributor

bors commented Jan 11, 2023

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

@kylematsuda kylematsuda marked this pull request as ready for review January 11, 2023 20:52
@rustbot
Copy link
Collaborator

rustbot commented Jan 11, 2023

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

Some changes occurred to the core trait solver

cc @rust-lang/initiative-trait-system-refactor

@lcnr
Copy link
Contributor

lcnr commented Jan 12, 2023

@bors r+ rollup=iffy

@bors
Copy link
Contributor

bors commented Jan 12, 2023

📌 Commit 6725380aa2a80d1d1ba533995d699cf2ba8c31d0 has been approved by lcnr

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 Jan 12, 2023
@bors
Copy link
Contributor

bors commented Jan 12, 2023

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

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 12, 2023
@bors
Copy link
Contributor

bors commented Jan 12, 2023

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

@lcnr
Copy link
Contributor

lcnr commented Jan 13, 2023

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jan 13, 2023

📌 Commit e0b70c806d4e467cf2891f75e19072ab22d6fc0b has been approved by lcnr

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 Jan 13, 2023
@bors
Copy link
Contributor

bors commented Jan 13, 2023

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

@bors bors 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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Jan 13, 2023
@jackh726
Copy link
Member

@bors r=lcnr rollup=never p=1

Bitrotty

@bors
Copy link
Contributor

bors commented Jan 14, 2023

📌 Commit 6e969ea has been approved by lcnr

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 Jan 14, 2023
@bors
Copy link
Contributor

bors commented Jan 14, 2023

⌛ Testing commit 6e969ea with merge b8f9cb3...

@bors
Copy link
Contributor

bors commented Jan 14, 2023

☀️ Test successful - checks-actions
Approved by: lcnr
Pushing b8f9cb3 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jan 14, 2023
@bors bors merged commit b8f9cb3 into rust-lang:master Jan 14, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 14, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (b8f9cb3): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Next Steps: If you can justify the regressions found in this perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please open an issue or create a new PR that fixes the regressions, add a comment linking to the newly created issue or PR, and then add the perf-regression-triaged label to this PR.

@rustbot label: +perf-regression
cc @rust-lang/wg-compiler-performance

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.2% [0.2%, 0.2%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
-0.3% [-0.4%, -0.2%] 3
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-0.4%, 0.2%] 4

Max RSS (memory usage)

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

Cycles

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

@rustbot rustbot added the perf-regression Performance regression. label Jan 14, 2023
@pnkfelix
Copy link
Member

there is one small regression to bitmaps-full doc, and three improvements to bitmaps-incr-full {check, debug, opt}.

If its not noise, its seems like the right trade off.

Marking as triaged.

@rustbot label: perf-regression-triaged

@rustbot rustbot added the perf-regression-triaged The performance regression has been triaged. label Jan 18, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 16, 2023
…r=compiler-errors

Small cleanups around `EarlyBinder`

Cleaning up a few things that were brought up by `@lcnr` in reviewing rust-lang#106696:

- [make `issue33140_self_ty` query return `Option<EarlyBinder<Ty>>`](rust-lang#106696 (comment))
- [small style improvement](rust-lang#106696 (comment))
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. perf-regression Performance regression. perf-regression-triaged The performance regression has been triaged. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

switch to EarlyBinder as default
7 participants