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

Uplift elaboration into rustc_type_ir #127439

Merged
merged 4 commits into from
Jul 8, 2024

Conversation

compiler-errors
Copy link
Member

Allows us to deduplicate and consolidate elaboration (including these stupid elaboration duplicate fns i added for pretty printing like 3 years ago) so I'm pretty hyped about this change :3

r? lcnr

@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 Jul 6, 2024
@rustbot
Copy link
Collaborator

rustbot commented Jul 6, 2024

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

@rustbot rustbot added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Jul 6, 2024
@@ -213,7 +213,12 @@ pub trait Interner:
fn explicit_super_predicates_of(
self,
def_id: Self::DefId,
) -> ty::EarlyBinder<Self, impl IntoIterator<Item = Self::Clause>>;
) -> ty::EarlyBinder<Self, impl IntoIterator<Item = (Self::Clause, Self::Span)>>;
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a somewhat dissatisfying incongruency between these fns and all the others above, but we need these in order to give good spans when elaborating 😆. 🤷

@@ -268,6 +270,11 @@ pub trait Interner:
param_env: Self::ParamEnv,
placeholder: Self::PlaceholderConst,
) -> Self::Ty;

fn anonymize_bound_vars<T: TypeFoldable<Self>>(
Copy link
Member Author

Choose a reason for hiding this comment

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

I'll uplift this later.

@rust-log-analyzer

This comment has been minimized.

@lcnr
Copy link
Contributor

lcnr commented Jul 7, 2024

nice, some nits and suggestions, otherwise r=me

@compiler-errors
Copy link
Member Author

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Jul 7, 2024

📌 Commit 15d16f1 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 Jul 7, 2024
jieyouxu added a commit to jieyouxu/rust that referenced this pull request Jul 8, 2024
…r=lcnr

Uplift elaboration into `rustc_type_ir`

Allows us to deduplicate and consolidate elaboration (including these stupid elaboration duplicate fns i added for pretty printing like 3 years ago) so I'm pretty hyped about this change :3

r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 8, 2024
Rollup of 12 pull requests

Successful merges:

 - rust-lang#113128 (Support tail calls in mir via `TerminatorKind::TailCall`)
 - rust-lang#126841 ([`macro_metavar_expr_concat`] Add support for literals)
 - rust-lang#126881 (Make `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` a deny-by-default lint in edition 2024)
 - rust-lang#126921 (Give VaList its own home)
 - rust-lang#127276 (rustdoc: Remove OpaqueTy)
 - rust-lang#127367 (Run alloc sync tests)
 - rust-lang#127431 (Use field ident spans directly instead of the full field span in diagnostics on local fields)
 - rust-lang#127437 (Uplift trait ref is knowable into `rustc_next_trait_solver`)
 - rust-lang#127439 (Uplift elaboration into `rustc_type_ir`)
 - rust-lang#127451 (Improve `run-make/output-type-permutations` code and improve `filename_not_in_denylist` API)
 - rust-lang#127452 (Fix intrinsic const parameter counting with `effects`)
 - rust-lang#127459 (rustdoc-json: add type/trait alias tests)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 8, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#126841 ([`macro_metavar_expr_concat`] Add support for literals)
 - rust-lang#126881 (Make `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` a deny-by-default lint in edition 2024)
 - rust-lang#126921 (Give VaList its own home)
 - rust-lang#127367 (Run alloc sync tests)
 - rust-lang#127431 (Use field ident spans directly instead of the full field span in diagnostics on local fields)
 - rust-lang#127437 (Uplift trait ref is knowable into `rustc_next_trait_solver`)
 - rust-lang#127439 (Uplift elaboration into `rustc_type_ir`)
 - rust-lang#127451 (Improve `run-make/output-type-permutations` code and improve `filename_not_in_denylist` API)
 - rust-lang#127452 (Fix intrinsic const parameter counting with `effects`)
 - rust-lang#127459 (rustdoc-json: add type/trait alias tests)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit ffb9336 into rust-lang:master Jul 8, 2024
6 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 8, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 8, 2024
Rollup merge of rust-lang#127439 - compiler-errors:uplift-elaborate, r=lcnr

Uplift elaboration into `rustc_type_ir`

Allows us to deduplicate and consolidate elaboration (including these stupid elaboration duplicate fns i added for pretty printing like 3 years ago) so I'm pretty hyped about this change :3

r? lcnr
@compiler-errors
Copy link
Member Author

@rust-timer build 194c829

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (194c829): comparison URL.

Overall result: ❌✅ regressions and improvements - ACTION NEEDED

Benchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf.

Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @rustbot label: +perf-regression-triaged along with sufficient written justification. If you cannot justify the regressions please fix the regressions and do another perf run. If the next run shows neutral or positive results, the label will be automatically removed.

@bors rollup=never
@rustbot label: -S-waiting-on-perf +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.5% [0.2%, 1.7%] 20
Regressions ❌
(secondary)
0.4% [0.1%, 0.9%] 5
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-0.2% [-0.3%, -0.2%] 2
All ❌✅ (primary) 0.5% [0.2%, 1.7%] 20

Max RSS (memory usage)

Results (secondary 2.6%)

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)
2.6% [2.6%, 2.6%] 1
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) - - 0

Cycles

Results (primary -2.3%, secondary -3.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)
2.4% [1.6%, 3.4%] 11
Improvements ✅
(primary)
-2.3% [-3.7%, -1.7%] 6
Improvements ✅
(secondary)
-9.1% [-13.4%, -5.3%] 10
All ❌✅ (primary) -2.3% [-3.7%, -1.7%] 6

Binary size

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

Bootstrap: 699.651s -> 702.108s (0.35%)
Artifact size: 328.40 MiB -> 328.62 MiB (0.07%)

@rustbot rustbot added the perf-regression Performance regression. label Jul 9, 2024
flip1995 pushed a commit to flip1995/rust that referenced this pull request Jul 11, 2024
Rollup of 10 pull requests

Successful merges:

 - rust-lang#126841 ([`macro_metavar_expr_concat`] Add support for literals)
 - rust-lang#126881 (Make `NEVER_TYPE_FALLBACK_FLOWING_INTO_UNSAFE` a deny-by-default lint in edition 2024)
 - rust-lang#126921 (Give VaList its own home)
 - rust-lang#127367 (Run alloc sync tests)
 - rust-lang#127431 (Use field ident spans directly instead of the full field span in diagnostics on local fields)
 - rust-lang#127437 (Uplift trait ref is knowable into `rustc_next_trait_solver`)
 - rust-lang#127439 (Uplift elaboration into `rustc_type_ir`)
 - rust-lang#127451 (Improve `run-make/output-type-permutations` code and improve `filename_not_in_denylist` API)
 - rust-lang#127452 (Fix intrinsic const parameter counting with `effects`)
 - rust-lang#127459 (rustdoc-json: add type/trait alias tests)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
perf-regression Performance regression. 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. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants