Remove SubdiagMessage in favour of the identical DiagMessage#152351
Remove SubdiagMessage in favour of the identical DiagMessage#152351rust-bors[bot] merged 1 commit intorust-lang:mainfrom
SubdiagMessage in favour of the identical DiagMessage#152351Conversation
This comment has been minimized.
This comment has been minimized.
75799cc to
1904242
Compare
1904242 to
c78245b
Compare
c78245b to
8ef2969
Compare
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy
cc @davidtwco, @TaKO8Ki The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. |
8ef2969 to
0c2b058
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
|
Let's see how this works :) |
|
🔨 3 commits were squashed into ea36128. |
0c2b058 to
ea36128
Compare
|
I like to have the seperate commits as a way to guide the review order, but indeed for this PR it didn't really make sense given how small the other commits are |
There was a problem hiding this comment.
Nice cleanup. r=me if you want it, but if you want to wait for @jdonszelmann that's fine too :)
| /// | ||
| /// - If the `SubdiagMessage` is non-translatable then return the message as a `DiagMessage`. | ||
| /// - If `self` is non-translatable then return `self`'s message. | ||
| pub fn with_subdiagnostic_message(&self, sub: SubdiagMessage) -> Self { |
There was a problem hiding this comment.
This is the heart of the change, right? I.e. this was the main thing that distinguished DiagMessage and SubdiagMessage... I assume the .ftl removal eliminated uses of this method?
There was a problem hiding this comment.
Indeed, previously sub-diags like #[help] were allowed to have no slug, and would automatically take the parent DiagMessage's slug and add _help. There was an extra variant for this in SubdiagMessage which was already removed.
After the removal of .ftl files, all sub-diags need to have their own message so this distinction no longer exists
|
@bors r=nnethercote |
…nnethercote Remove `SubdiagMessage` in favour of the identical `DiagMessage` For rust-lang#151366 Just some more cleanup :) SubdiagMessage is now identical to DiagMessage, so there's no point in having both of them
…nnethercote Remove `SubdiagMessage` in favour of the identical `DiagMessage` For rust-lang#151366 Just some more cleanup :) SubdiagMessage is now identical to DiagMessage, so there's no point in having both of them
…uwer Rollup of 11 pull requests Successful merges: - #152364 (Port a lot of attributes to the new parser) - #151954 (Add help message suggesting explicit reference cast for From/TryFrom) - #152148 (Move `impl Interner for TyCtxt` to its own submodule) - #152226 (Modernize diagnostic for indeterminate trait object lifetime bounds) - #152351 (Remove `SubdiagMessage` in favour of the identical `DiagMessage`) - #152417 (Move the needs-drop check for `arena_cache` queries out of macro code) - #150688 (typeck: Make it clearer that `check_pat_lit` only handles literal patterns) - #152293 (Format heterogeneous try blocks) - #152355 (Update documentation of rustc_macros) - #152396 (Uplift `Predicate::allow_normalization` to `rustc_type_ir`) - #152425 (Port #![test_runner] to the attribute parser)
…uwer Rollup of 10 pull requests Successful merges: - #152364 (Port a lot of attributes to the new parser) - #151954 (Add help message suggesting explicit reference cast for From/TryFrom) - #152148 (Move `impl Interner for TyCtxt` to its own submodule) - #152226 (Modernize diagnostic for indeterminate trait object lifetime bounds) - #152351 (Remove `SubdiagMessage` in favour of the identical `DiagMessage`) - #152417 (Move the needs-drop check for `arena_cache` queries out of macro code) - #150688 (typeck: Make it clearer that `check_pat_lit` only handles literal patterns) - #152293 (Format heterogeneous try blocks) - #152355 (Update documentation of rustc_macros) - #152396 (Uplift `Predicate::allow_normalization` to `rustc_type_ir`)
…nnethercote Remove `SubdiagMessage` in favour of the identical `DiagMessage` For rust-lang#151366 Just some more cleanup :) SubdiagMessage is now identical to DiagMessage, so there's no point in having both of them
For #151366
Just some more cleanup :)
SubdiagMessage is now identical to DiagMessage, so there's no point in having both of them