-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Reduce fluent boilerplate #118158
Reduce fluent boilerplate #118158
Conversation
cc @davidtwco, @compiler-errors, @JohnTitor, @TaKO8Ki Some changes occurred in compiler/rustc_codegen_gcc cc @antoyo Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt These commits modify the If this was unintentional then you should revert the changes before this PR is merged. |
This comment has been minimized.
This comment has been minimized.
0804b70
to
9b70c9a
Compare
This comment has been minimized.
This comment has been minimized.
9b70c9a
to
0e2ff9d
Compare
☔ The latest upstream changes (presumably #118203) made this pull request unmergeable. Please resolve the merge conflicts. |
It's empty, and it doesn't even make sense, because `rustc_error_messages` is a lower-level crate than `rustc_errors`.
The `fluent_messages!` macro produces uses of `crate::{D,Subd}iagnosticMessage`, which means that every crate using the macro must have this import: ``` use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage}; ``` This commit changes the macro to instead use `rustc_errors::{D,Subd}iagnosticMessage`, which avoids the need for the imports.
Currently we always do this: ``` use rustc_fluent_macro::fluent_messages; ... fluent_messages! { "./example.ftl" } ``` But there is no need, we can just do this everywhere: ``` rustc_fluent_macro::fluent_messages! { "./example.ftl" } ``` which is shorter.
0e2ff9d
to
af3fbb3
Compare
I rebased. |
r? compiler-errors @bors r+ |
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#117651 (coverage: Simplify building coverage expressions based on sums) - rust-lang#117968 (Stabilize `ptr::addr_eq`) - rust-lang#118158 (Reduce fluent boilerplate) - rust-lang#118201 (Miscellaneous `ObligationCauseCode` cleanups) - rust-lang#118288 (Use `is_{some,ok}_and` more in the compiler) - rust-lang#118289 (`is_{some,ok}_and` for rustdoc) - rust-lang#118290 (Don't ICE when encountering placeholders in implied bounds computation) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#117651 (coverage: Simplify building coverage expressions based on sums) - rust-lang#117968 (Stabilize `ptr::addr_eq`) - rust-lang#118158 (Reduce fluent boilerplate) - rust-lang#118201 (Miscellaneous `ObligationCauseCode` cleanups) - rust-lang#118288 (Use `is_{some,ok}_and` more in the compiler) - rust-lang#118289 (`is_{some,ok}_and` for rustdoc) - rust-lang#118290 (Don't ICE when encountering placeholders in implied bounds computation) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#118158 - nnethercote:reduce-fluent-boilerplate, r=compiler-errors Reduce fluent boilerplate Best reviewed one commit at a time. r? `@davidtwco`
Best reviewed one commit at a time.
r? @davidtwco