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 to -Znext-solver #118937

Merged
merged 4 commits into from
Dec 14, 2023
Merged

Conversation

lcnr
Copy link
Contributor

@lcnr lcnr commented Dec 14, 2023

renames the feature flag to enable the new trait solver.

still want some feedback before merging: https://rust-lang.zulipchat.com/#narrow/stream/364551-t-types.2Ftrait-system-refactor/topic/renaming.20the.20feature.20flag.20to.20.60-Znew-solver.60.

The idea is to make it easier to add another option, e.g. to enable the solver in wfcheck or to optionally change its behavior to our new coinduction approach.

r? @compiler-errors

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Dec 14, 2023
Comment on lines +759 to +763
/// Whether the new trait solver should be enabled in coherence.
pub coherence: bool,
/// Whether the new trait solver should be enabled everywhere.
/// This is only `true` if `coherence` is also enabled.
pub globally: bool,
Copy link
Member

Choose a reason for hiding this comment

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

This should probably still be flattened to an enum by argparsing

Copy link
Member

@compiler-errors compiler-errors Dec 14, 2023

Choose a reason for hiding this comment

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

Actually nvm, if we will have multiple bools then it will get unwieldy. Maybe consider a more clear name for the the "rest of the compiler" option? idk

@lcnr lcnr force-pushed the rename-solver-flag branch 2 times, most recently from 663f55e to 5dffef2 Compare December 14, 2023 13:39
@lcnr lcnr changed the title -Ztrait-solver=next to -Znew-solver -Ztrait-solver=next to -Znext-solver Dec 14, 2023
@rustbot
Copy link
Collaborator

rustbot commented Dec 14, 2023

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

@lcnr lcnr force-pushed the rename-solver-flag branch from 5dffef2 to aea630b Compare December 14, 2023 13:41
Copy link
Member

@compiler-errors compiler-errors left a comment

Choose a reason for hiding this comment

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

r=me

@lcnr lcnr force-pushed the rename-solver-flag branch 2 times, most recently from 9b0bf29 to 6863468 Compare December 14, 2023 13:58
@lcnr lcnr marked this pull request as ready for review December 14, 2023 13:58
@rustbot
Copy link
Collaborator

rustbot commented Dec 14, 2023

Some changes occurred to the core trait solver

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

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in engine.rs, potentially modifying the public API of ObligationCtxt.

cc @lcnr, @compiler-errors

@lcnr

This comment was marked as outdated.

@bors

This comment was marked as outdated.

@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 Dec 14, 2023
@lcnr lcnr force-pushed the rename-solver-flag branch from f08b4d1 to ceb4f6b Compare December 14, 2023 14:01
@lcnr

This comment was marked as outdated.

@lcnr lcnr closed this Dec 14, 2023
@lcnr lcnr reopened this Dec 14, 2023
@lcnr
Copy link
Contributor Author

lcnr commented Dec 14, 2023

@bors r=compiler-errors rollup=never

@bors
Copy link
Contributor

bors commented Dec 14, 2023

📌 Commit ceb4f6b has been approved by compiler-errors

It is now in the queue for this repository.

@rust-log-analyzer

This comment has been minimized.

@compiler-errors
Copy link
Member

CI failure looks unrelated

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@lcnr lcnr force-pushed the rename-solver-flag branch from ceb4f6b to fa03289 Compare December 14, 2023 14:22
@lcnr
Copy link
Contributor Author

lcnr commented Dec 14, 2023

@bors r=compiler-errors rollup=never

@bors
Copy link
Contributor

bors commented Dec 14, 2023

📌 Commit fa03289 has been approved by compiler-errors

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Dec 14, 2023

⌛ Testing commit fa03289 with merge 2ecba0f...

@bors
Copy link
Contributor

bors commented Dec 14, 2023

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (2ecba0f): comparison URL.

Overall result: ✅ improvements - no action needed

@rustbot label: -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)
- - 0
Improvements ✅
(primary)
-0.9% [-1.0%, -0.9%] 4
Improvements ✅
(secondary)
-0.5% [-0.8%, -0.3%] 21
All ❌✅ (primary) -0.9% [-1.0%, -0.9%] 4

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.8% [0.8%, 0.8%] 1
Regressions ❌
(secondary)
4.5% [4.5%, 4.5%] 1
Improvements ✅
(primary)
-1.7% [-1.7%, -1.7%] 1
Improvements ✅
(secondary)
-2.2% [-3.5%, -0.8%] 2
All ❌✅ (primary) -0.4% [-1.7%, 0.8%] 2

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.9% [0.9%, 0.9%] 1
Regressions ❌
(secondary)
2.9% [2.9%, 2.9%] 1
Improvements ✅
(primary)
-0.4% [-0.4%, -0.4%] 1
Improvements ✅
(secondary)
-2.2% [-2.3%, -2.0%] 2
All ❌✅ (primary) 0.2% [-0.4%, 0.9%] 2

Binary size

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

Bootstrap: 672.087s -> 673.223s (0.17%)
Artifact size: 312.43 MiB -> 312.46 MiB (0.01%)

@lcnr lcnr deleted the rename-solver-flag branch December 18, 2023 05:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testsuite Area: The testsuite used to check the correctness of rustc 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-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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants