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

-Ztrait-solver=next: stop depending on old solver #113317

Merged
merged 2 commits into from
Jul 5, 2023

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Jul 4, 2023

removes the final dependencies on the old solver when -Ztrait-solver=next is enabled.

@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2023

r? @oli-obk

(rustbot has picked a reviewer for you, use r? to override)

@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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Jul 4, 2023
@rustbot
Copy link
Collaborator

rustbot commented Jul 4, 2023

Some changes occurred to the core trait solver

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

ty::GenericArgKind::Type(ty_a) => {
let ty_a = ocx.infcx.resolve_vars_if_possible(ty_a);
let mut ty_a = ocx.infcx.resolve_vars_if_possible(ty_a);
// Need to manually normalize in the new solver as `wf::obligations` does not.
Copy link
Contributor

Choose a reason for hiding this comment

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

Why isn't that done? I see that you're bailing out in WfPredicates::normalize, but not why

Copy link
Contributor Author

@lcnr lcnr Jul 4, 2023

Choose a reason for hiding this comment

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

extended the comment in wf.rs, the reasons are

  • the new solver can only deeply normalize if there is no ambiguity, so there is nothing we could use in wf
  • we never have to normalize obligations in the new solver, but we do have to normalize the inputs to region solving

@oli-obk
Copy link
Contributor

oli-obk commented Jul 4, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Jul 4, 2023

📌 Commit 3129942 has been approved by oli-obk

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 4, 2023
@lcnr lcnr mentioned this pull request Jul 4, 2023
11 tasks
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 5, 2023
…mpiler-errors

Rollup of 8 pull requests

Successful merges:

 - rust-lang#113010 (rust-installer & rls: remove exclusion from rustfmt & tidy )
 - rust-lang#113317 ( -Ztrait-solver=next: stop depending on old solver)
 - rust-lang#113319 (`TypeParameterDefinition` always require a `DefId`)
 - rust-lang#113320 (Add some extra information to opaque type cycle errors)
 - rust-lang#113321 (Move `ty::ConstKind` to `rustc_type_ir`)
 - rust-lang#113337 (Winnow specialized impls during selection in new solver)
 - rust-lang#113355 (Move most coverage code out of `rustc_codegen_ssa`)
 - rust-lang#113356 (Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit a1f8edb into rust-lang:master Jul 5, 2023
11 checks passed
@rustbot rustbot added this to the 1.72.0 milestone Jul 5, 2023
@compiler-errors
Copy link
Member

@rust-timer build 3cfc22c1d7b73b6e6f271d624b47ed04b02eb208

@rust-timer

This comment has been minimized.

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (3cfc22c1d7b73b6e6f271d624b47ed04b02eb208): comparison URL.

Overall result: ❌ regressions - no 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.

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

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

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.7% [0.6%, 0.8%] 6
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.1% [-2.1%, -2.1%] 1
All ❌✅ (primary) 0.7% [0.6%, 0.8%] 6

Binary size

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

Bootstrap: 655.622s -> 658.311s (0.41%)

@lcnr lcnr deleted the sketchy-new-select branch July 6, 2023 10:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. 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