Rollup merge of #118158 - nnethercote:reduce-fluent-boilerplate, r=compiler-errors

Reduce fluent boilerplate

Best reviewed one commit at a time.

r? `@davidtwco`
This commit is contained in:
Michael Goulet
2023-11-25 17:23:33 -05:00
committed by GitHub
51 changed files with 305 additions and 418 deletions

View File

@@ -55,10 +55,7 @@ use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::sorted_map::SortedMap;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::sync::Lrc;
use rustc_errors::{
DiagnosticArgFromDisplay, DiagnosticMessage, Handler, StashKey, SubdiagnosticMessage,
};
use rustc_fluent_macro::fluent_messages;
use rustc_errors::{DiagnosticArgFromDisplay, Handler, StashKey};
use rustc_hir as hir;
use rustc_hir::def::{DefKind, LifetimeRes, Namespace, PartialRes, PerNS, Res};
use rustc_hir::def_id::{LocalDefId, CRATE_DEF_ID, LOCAL_CRATE};
@@ -94,7 +91,7 @@ mod lifetime_collector;
mod pat;
mod path;
fluent_messages! { "../messages.ftl" }
rustc_fluent_macro::fluent_messages! { "../messages.ftl" }
struct LoweringContext<'a, 'hir> {
tcx: TyCtxt<'hir>,