about summary refs log tree commit diff
path: root/compiler/rustc_fluent_macro/src/fluent.rs
AgeCommit message (Collapse)AuthorLines
2025-05-12update cfg(bootstrap)Pietro Albini-3/+0
2025-04-11Replace proc_macro::SourceFile by Span::{file, local_file}.Mara Bos-0/+3
2025-02-28rustc_fluent_macro: use CARGO_CRATE_NAME instead of CARGO_PKG_NAMEbinarycat-2/+2
fixes #137815
2024-10-19use tracked_path in rustc_fluent_macrousamoi-2/+2
2024-09-22Reformat using the new identifier sorting from rustfmtMichael Goulet-1/+1
2024-09-17fluent_macro: fix diagnostics for fluent parse failuresXiretza-17/+0
This line number calculation was both wrong and unnecessary.
2024-08-19Update annotate-snippets to 0.11Xiretza-21/+9
2024-07-29Reformat `use` declarations.Nicholas Nethercote-11/+7
The previous commit updated `rustfmt.toml` appropriately. This commit is the outcome of running `x fmt --all` with the new formatting options.
2024-07-19Avoid ref when using format! in compilerYuri Astrakhan-1/+1
Clean up a few minor refs in `format!` macro, as it has a performance cost. Apparently the compiler is unable to inline `format!("{}", &variable)`, and does a run-time double-reference instead (format macro already does one level referencing). Inlining format args prevents accidental `&` misuse.
2024-03-05Rename `SubdiagnosticMessage` as `SubdiagMessage`.Nicholas Nethercote-12/+12
2024-03-05Rename `DiagnosticMessage` as `DiagMessage`.Nicholas Nethercote-2/+5
2024-01-07annotate-snippets: update to 0.10klensy-7/+3
2023-11-26Avoid need for `{D,Subd}iagnosticMessage` imports.Nicholas Nethercote-19/+14
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.
2023-10-02Factor out common token generation in `fluent_messages`.Nicholas Nethercote-38/+20
The failure and success cases are similar enough that they can share code.
2023-05-26Fix diagnostics with errorsclubby789-12/+9
2023-05-26Validate fluent variable references with `debug_assertions`clubby789-3/+42
2023-04-18Add `rustc_fluent_macro` to decouple fluent from `rustc_macros`Nilstrieb-0/+336
Fluent, with all the icu4x it brings in, takes quite some time to compile. `fluent_messages!` is only needed in further downstream rustc crates, but is blocking more upstream crates like `rustc_index`. By splitting it out, we allow `rustc_macros` to be compiled earlier, which speeds up `x check compiler` by about 5 seconds (and even more after the needless dependency on `serde_json` is removed from `rustc_data_structures`).