Migrate codegen_ssa to diagnostics structs - [Part 3]#104543
Merged
bors merged 8 commits intorust-lang:masterfrom Jan 8, 2023
Merged
Migrate codegen_ssa to diagnostics structs - [Part 3]#104543bors merged 8 commits intorust-lang:masterfrom
codegen_ssa to diagnostics structs - [Part 3]#104543bors merged 8 commits intorust-lang:masterfrom
Conversation
Collaborator
|
cc @davidtwco, @compiler-errors, @JohnTitor, @estebank, @TaKO8Ki |
This comment was marked as resolved.
This comment was marked as resolved.
9a31b3c to
ae02fa7
Compare
JhonnyBillM
commented
Nov 23, 2022
ae02fa7 to
703550b
Compare
Member
|
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
davidtwco
approved these changes
Jan 7, 2023
Member
|
Apologies for the delay in getting to this. @bors r+ |
Collaborator
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Completes migrating
codegen_ssamodule except 2 outstanding errors that depend on other crates:rustc_middle::mir::interpret::InterpError: I sawrustc_middleis 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
Diagnostic2.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