-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Migrate codegen_ssa
to diagnostics structs - [Part 3]
#104543
Migrate codegen_ssa
to diagnostics structs - [Part 3]
#104543
Conversation
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
This comment was marked as resolved.
This comment was marked as resolved.
9a31b3c
to
ae02fa7
Compare
ae02fa7
to
703550b
Compare
Apologies for the delay in getting to this - it's a great start. :)
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.
Feel free to take this on. |
db17787
to
ff78cf4
Compare
This comment was marked as resolved.
This comment was marked as resolved.
ff78cf4
to
7e2bbd8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
WIP - replacing span_invalid_monomorphization_error function. Still in progress due to its use in codegen_llvm inside macros
UPDATE - migrate constant span_bug to translatable diagnostic.
7e2bbd8
to
4d63d7d
Compare
Apologies for the delay in getting to this. @bors r+ |
…-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`
…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
Completes migrating
codegen_ssa
module except 2 outstanding errors that depend on other crates:rustc_middle::mir::interpret::InterpError
: I sawrustc_middle
is unassigned, I am open to take this work.codegen_llvm
's use offn 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