-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Work tracking issue for moving rustc_infer
error reporting into rustc_trait_selection
#127492
Open
7 of 12 tasks
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-type-system
Area: Type system
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Comments
rustbot
added
the
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
label
Jul 8, 2024
Noratrieb
added
A-type-system
Area: Type system
A-diagnostics
Area: Messages for errors, warnings, and lints
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
and removed
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
labels
Jul 8, 2024
This was referenced Jul 8, 2024
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 9, 2024
…r=lcnr Move trait selection error reporting to its own top-level module This effectively moves `rustc_trait_selection::traits::error_reporting` to `rustc_trait_selection::error_reporting::traits`. There are only a couple of actual changes to the code, like moving the `pretty_impl_header` fn out of the specialization module for privacy reasons. This is quite pointless on its own, but having `error_reporting` as a top-level module in `rustc_trait_selection` is very important to make sure we have a meaningful file structure for when we move **type** error reporting (and region error reporting, with which it's incredibly entangled currently) into `rustc_trait_selection`. I've opened a tracking issue here: rust-lang#127492 r? lcnr
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 9, 2024
…rrors, r=lcnr Consolidate region error reporting in `rustc_infer` More work on rust-lang#127492. Separate but important step, since I'm gonna likely pull everything else here into another module. I don't think I'm confident whether `nice_region_error` should be a submodule of the new `rustc_infer::infer::error_reporting::region` module, so I left it alone for now. r? lcnr
matthiaskrgr
added a commit
to matthiaskrgr/rust
that referenced
this issue
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 issue
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 issue
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 issue
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 issue
Jul 10, 2024
…orking, 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 issue
Jul 22, 2024
…rait-sel, r=lcnr Uplift most type-system related error reporting from `rustc_infer` to `rustc_trait_selection` Completes the major part of rust-lang#127492. The only cleanup that's needed afterwards is to actually use normalization in favor of the callback where needed, and deleting `can_eq_shallow`. r? lcnr Sorry for the large diff! Would prefer if comments can be handled in a follow-up (unless they're absolutely dealbreakers) because it seems bitrotty to let this sit.
bors
added a commit
to rust-lang-ci/rust
that referenced
this issue
Jul 22, 2024
…rait-sel, r=lcnr Uplift most type-system related error reporting from `rustc_infer` to `rustc_trait_selection` Completes the major part of rust-lang#127492. The only cleanup that's needed afterwards is to actually use normalization in favor of the callback where needed, and deleting `can_eq_shallow`. r? lcnr Sorry for the large diff! Would prefer if comments can be handled in a follow-up (unless they're absolutely dealbreakers) because it seems bitrotty to let this sit.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
A-diagnostics
Area: Messages for errors, warnings, and lints
A-type-system
Area: Type system
C-tracking-issue
Category: A tracking issue for an RFC or an unstable feature.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I'm mostly just opening this for myself since I want somewhere to track the work. Look away unless you care about completely compiler-internal stuff.
The motivation for doing this is that error reporting in
rustc_infer
is fraught with challenges, like the lack of trait selection. This became evident in #127172, which demonstrates that the new trait solver needs trait selection in order to actually even prove that things can be equal or not. We also suffer from the lack of normalization, and to a lesser extent autoderef (though the latter isn't yet uplifted into trait selection, it very well could be, or at least replicated in some way for the purposes of diagnostics, but that requires trait selection lol)rustc_trait_selection::error_reporting
module (Move trait selection error reporting to its own top-level module #127493)error_reporting::traits
(fromtraits::error_reporting
) (Move trait selection error reporting to its own top-level module #127493)error_reporting::traits
(e.g. no need to havetype_err_ctxt_ext
module) (Get rid ofInferCtxtExt
fromerror_reporting::traits
#128076)rustc_trait_selection::error_reporting::infer
(Uplift most type-system related error reporting fromrustc_infer
torustc_trait_selection
#128041)rustc_infer
torustc_trait_selection
#128041)rustc_infer
#127500)TypeErrCtxt
intorustc_trait_selection
, and delete all the extension traits (since they can be inherent now) (Uplift most type-system related error reporting fromrustc_infer
torustc_trait_selection
#128041)can_eq_shallow
(Get rid ofcan_eq_shallow
#128067)TypeErrCtxt
since normalization is defined inrustc_trait_selection
The text was updated successfully, but these errors were encountered: