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

Move trait selection error reporting to its own top-level module #127493

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

compiler-errors
Copy link
Member

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

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: #127492

r? lcnr

@rustbot
Copy link
Collaborator

rustbot commented Jul 8, 2024

HIR ty lowering was modified

cc @fmease

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

cc @lcnr, @compiler-errors

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

Some changes occurred to the core trait solver

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

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

@rustbot
Copy link
Collaborator

rustbot commented Jul 8, 2024

Some changes occurred in src/tools/clippy

cc @rust-lang/clippy

@lcnr
Copy link
Contributor

lcnr commented Jul 9, 2024

@bors r+ rollup=iffy ❤️

@bors
Copy link
Contributor

bors commented Jul 9, 2024

📌 Commit fe4c995 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
@bors
Copy link
Contributor

bors commented Jul 9, 2024

⌛ Testing commit fe4c995 with merge a2d5819...

@bors
Copy link
Contributor

bors commented Jul 9, 2024

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

@rust-timer
Copy link
Collaborator

Finished benchmarking commit (a2d5819): 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 (primary 3.9%, 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)
3.9% [3.9%, 3.9%] 1
Regressions ❌
(secondary)
- - 0
Improvements ✅
(primary)
- - 0
Improvements ✅
(secondary)
-2.3% [-2.4%, -2.2%] 2
All ❌✅ (primary) 3.9% [3.9%, 3.9%] 1

Binary size

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

Bootstrap: 703.117s -> 699.685s (-0.49%)
Artifact size: 328.74 MiB -> 328.81 MiB (0.02%)

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
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 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
tgross35 added a commit to tgross35/rust that referenced this pull request Jul 16, 2024
…-mod-struture, r=lcnr

Invert infer `error_reporting` mod struture

Parallel change to rust-lang#127493, which moves `rustc_infer::infer::error_reporting` to `rustc_infer::error_reporting::infer`. After this, we should just be able to merge this into `rustc_trait_selection::error_reporting::infer`, and pull down `TypeErrCtxt` into that crate. 👍

r? lcnr
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Jul 17, 2024
Rollup merge of rust-lang#127501 - compiler-errors:invert-infer-error-mod-struture, r=lcnr

Invert infer `error_reporting` mod struture

Parallel change to rust-lang#127493, which moves `rustc_infer::infer::error_reporting` to `rustc_infer::error_reporting::infer`. After this, we should just be able to merge this into `rustc_trait_selection::error_reporting::infer`, and pull down `TypeErrCtxt` into that crate. 👍

r? lcnr
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