Skip to content

Conversation

JhonnyBillM
Copy link
Contributor

Completes migrating codegen_ssa module except 2 outstanding errors that depend on other crates:

  1. rustc_middle::mir::interpret::InterpError: I saw rustc_middle is unassigned, I am open to take this work.

  2. codegen_llvm's use of fn span_invalid_monomorphization_error, which I started to replace in the last commit of this PR, but would like to know the team's preference on how we should keep replacing the other macros:
    2.1. Update macros to expect a Diagnostic
    2.2. Remove macros and expand the code on each use.
    See some examples of the different options in this experimental commit

Part 2 - #103792

r? @davidtwco
Cc @compiler-errors

@rustbot rustbot added T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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. labels Nov 17, 2022
@rustbot
Copy link
Collaborator

rustbot commented Nov 17, 2022

rustc_error_messages was changed

cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki

@bors

This comment was marked as resolved.

@JhonnyBillM JhonnyBillM force-pushed the migrate-codegen-ssa-to-diagnostics-structs-pt3 branch from 9a31b3c to ae02fa7 Compare November 23, 2022 06:09
@JhonnyBillM JhonnyBillM force-pushed the migrate-codegen-ssa-to-diagnostics-structs-pt3 branch from ae02fa7 to 703550b Compare November 23, 2022 06:44
@davidtwco
Copy link
Member

Apologies for the delay in getting to this - it's a great start. :)

codegen_llvm's use of fn span_invalid_monomorphization_error

I think the way you've replaced this so far is good - the macro just helped avoid the duplication of the shared parts of the diagnostic message, but that isn't a concern in the code when using Fluent, so it's fine to do it as you have been.

rustc_middle::mir::interpret::InterpError: I saw rustc_middle is unassigned, I am open to take this work.

Feel free to take this on.

@JhonnyBillM JhonnyBillM force-pushed the migrate-codegen-ssa-to-diagnostics-structs-pt3 branch from db17787 to ff78cf4 Compare November 27, 2022 02:44
@bors

This comment was marked as resolved.

@JhonnyBillM JhonnyBillM force-pushed the migrate-codegen-ssa-to-diagnostics-structs-pt3 branch from ff78cf4 to 7e2bbd8 Compare December 4, 2022 17:42
@bors

This comment was marked as resolved.

@JhonnyBillM JhonnyBillM force-pushed the migrate-codegen-ssa-to-diagnostics-structs-pt3 branch from 7e2bbd8 to 4d63d7d Compare December 28, 2022 03:03
@davidtwco
Copy link
Member

Apologies for the delay in getting to this.

@bors r+

@bors
Copy link
Collaborator

bors commented Jan 7, 2023

📌 Commit 4d63d7d has been approved by davidtwco

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 Jan 7, 2023
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jan 7, 2023
…-diagnostics-structs-pt3, r=davidtwco

Migrate `codegen_ssa` to diagnostics structs - [Part 3]

Completes migrating `codegen_ssa` module except 2 outstanding errors that depend on other crates:
1. [`rustc_middle::mir::interpret::InterpError`](https://github.com/rust-lang/rust/blob/b6097f2e1b2ca62e188ba53cf43bd66b06b36915/compiler/rustc_middle/src/mir/interpret/error.rs#L475): I saw `rustc_middle` is unassigned, I am open to take this work.

2.  `codegen_llvm`'s use of `fn span_invalid_monomorphization_error`, which I started to replace in the [last commit](rust-lang@9a31b3c) of this PR, but would like to know the team's preference on how we should keep replacing the other macros:
2.1. Update macros to expect a `Diagnostic`
2.2. Remove macros and expand the code on each use.
See [some examples of the different options in this experimental commit](JhonnyBillM@64aee83)

_Part 2 - https://github.com/rust-lang/rust/pull/103792_

r? `@davidtwco`
Cc `@compiler-errors`
bors added a commit to rust-lang-ci/rust that referenced this pull request Jan 7, 2023
…iaskrgr

Rollup of 10 pull requests

Successful merges:

 - rust-lang#101936 (Migrating rustc_infer to session diagnostics (part 3))
 - rust-lang#104081 (PhantomData layout guarantees)
 - rust-lang#104543 (Migrate `codegen_ssa` to diagnostics structs - [Part 3])
 - rust-lang#105128 (Add O(1) `Vec -> VecDeque` conversion guarantee)
 - rust-lang#105517 (Fix process-panic-after-fork.rs to pass on newer versions of Android.)
 - rust-lang#105859 (Point out span where we could introduce higher-ranked lifetime)
 - rust-lang#106509 (Detect closures assigned to binding in block)
 - rust-lang#106553 (docs: make `HashSet::retain` doctest more clear)
 - rust-lang#106556 (rustdoc: remove no-op mobile CSS `.content { margin-left: 0 }`)
 - rust-lang#106564 (Change to immutable borrow when cloning element of RepeatN)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 771cfa5 into rust-lang:master Jan 8, 2023
@rustbot rustbot added this to the 1.68.0 milestone Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-translation Area: Translation infrastructure, and migrating existing diagnostics to SessionDiagnostic 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants