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

More trait error reworking #127495

Merged
merged 3 commits into from
Jul 10, 2024

Conversation

compiler-errors
Copy link
Member

@compiler-errors compiler-errors commented Jul 8, 2024

More work on #127492, specifically those sub-bullets under "Move trait error reporting to error_reporting::traits". Stacked on top of #127493.

This does introduce new TypeErrCtxt.*Ext traits, but those will be deleted soon. Splitting this work into bite-sized pieces is the only way that it's gonna be feasible to both author and review ❤️

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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative labels Jul 8, 2024
@rust-log-analyzer

This comment has been minimized.

@compiler-errors compiler-errors marked this pull request as ready for review July 9, 2024 13:58
@rustbot
Copy link
Collaborator

rustbot commented Jul 9, 2024

Some changes occurred to the core trait solver

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

@compiler-errors
Copy link
Member Author

This one's ready too :>

@@ -127,6 +137,195 @@ pub enum DefIdOrName {
Name(&'static str),
}

#[extension(pub trait TypeErrCtxtExt<'a, 'tcx>)]
impl<'a, 'tcx> TypeErrCtxt<'a, 'tcx> {
Copy link
Contributor

Choose a reason for hiding this comment

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

why did you move this out of fulfillment_errors?

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 believe I wanted to separate the public API (report_fulfillment_errors) from the impl details (reporting each specific error). Also wanted to make fulfillment_errors smaller module, bc it was like 4000 lines long.

Ideally fulfillment_errors has all the private impls (reporting specific fulfillment errors) except it's still currently pub because we report a single error (selection errors) manually in coercion rn.

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

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

apart from this question r=me

@compiler-errors
Copy link
Member Author

question answered, if u want me to fix anything later let's do it in a follow-up, since i want this generally to land before i make the big transition pr

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Jul 9, 2024

📌 Commit bbbff80 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 9, 2024
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…eworking, r=lcnr

More trait error reworking

More work on rust-lang#127492, specifically those sub-bullets under "Move trait error reporting to `error_reporting::traits`". Stacked on top of rust-lang#127493.

This does introduce new `TypeErrCtxt.*Ext` traits, but those will be deleted soon. Splitting this work into bite-sized pieces is the only way that it's gonna be feasible to both author and review ❤️

r? lcnr
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…eworking, r=lcnr

More trait error reworking

More work on rust-lang#127492, specifically those sub-bullets under "Move trait error reporting to `error_reporting::traits`". Stacked on top of rust-lang#127493.

This does introduce new `TypeErrCtxt.*Ext` traits, but those will be deleted soon. Splitting this work into bite-sized pieces is the only way that it's gonna be feasible to both author and review ❤️

r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
 - rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
 - rust-lang#127382 (Use verbose style when suggesting changing `const` with `let`)
 - rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
 - rust-lang#127495 (More trait error reworking)
 - rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
 - rust-lang#127508 (small search graph refactor)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…eworking, r=lcnr

More trait error reworking

More work on rust-lang#127492, specifically those sub-bullets under "Move trait error reporting to `error_reporting::traits`". Stacked on top of rust-lang#127493.

This does introduce new `TypeErrCtxt.*Ext` traits, but those will be deleted soon. Splitting this work into bite-sized pieces is the only way that it's gonna be feasible to both author and review ❤️

r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#124339 (allow overwriting the output of `rustc --version`)
 - rust-lang#125627 (migration lint for `expr2024` for the edition 2024)
 - rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
 - rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
 - rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
 - rust-lang#127495 (More trait error reworking)
 - rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
 - rust-lang#127508 (small search graph refactor)
 - rust-lang#127521 (Remove spastorino from SMIR)
 - rust-lang#127532 (documentation: update cmake version)

r? `@ghost`
`@rustbot` modify labels: rollup
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jul 9, 2024
…eworking, r=lcnr

More trait error reworking

More work on rust-lang#127492, specifically those sub-bullets under "Move trait error reporting to `error_reporting::traits`". Stacked on top of rust-lang#127493.

This does introduce new `TypeErrCtxt.*Ext` traits, but those will be deleted soon. Splitting this work into bite-sized pieces is the only way that it's gonna be feasible to both author and review ❤️

r? lcnr
bors added a commit to rust-lang-ci/rust that referenced this pull request Jul 9, 2024
…iaskrgr

Rollup of 8 pull requests

Successful merges:

 - rust-lang#127091 (impl FusedIterator and a size hint for the error sources iter)
 - rust-lang#127358 (Automatically taint when reporting errors from ItemCtxt)
 - rust-lang#127484 (`#[doc(alias)]`'s doc: say that ASCII spaces are allowed)
 - rust-lang#127495 (More trait error reworking)
 - rust-lang#127496 (Update `f16`/`f128` FIXMEs that needed `(NEG_)INFINITY`)
 - rust-lang#127508 (small search graph refactor)
 - rust-lang#127521 (Remove spastorino from SMIR)
 - rust-lang#127532 (documentation: update cmake version)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors
Copy link
Contributor

bors commented Jul 10, 2024

⌛ Testing commit bbbff80 with merge 956deab...

@bors
Copy link
Contributor

bors commented Jul 10, 2024

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

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jul 10, 2024
@bors bors merged commit 956deab into rust-lang:master Jul 10, 2024
7 checks passed
@rustbot rustbot added this to the 1.81.0 milestone Jul 10, 2024
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (956deab): 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)

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

Cycles

Results (secondary 2.3%)

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

Binary size

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

Bootstrap: 704.936s -> 702.638s (-0.33%)
Artifact size: 328.63 MiB -> 328.68 MiB (0.02%)

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. 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