Simplify message paths

This makes it easier to open the messages file while developing on features.

The commit was the result of automatted changes:

for p in compiler/rustc_*; do mv $p/locales/en-US.ftl $p/messages.ftl; rmdir $p/locales; done

for p in compiler/rustc_*; do sed -i "s#\.\./locales/en-US.ftl#../messages.ftl#" $p/src/lib.rs; done
This commit is contained in:
est31 2023-03-03 00:18:38 +01:00
parent 8a73f50d87
commit 7e2ecb3cd8
68 changed files with 34 additions and 34 deletions

View File

@ -92,7 +92,7 @@ mod lifetime_collector;
mod pat;
mod path;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
struct LoweringContext<'a, 'hir> {
tcx: TyCtxt<'hir>,

View File

@ -21,4 +21,4 @@ pub mod feature_gate;
pub mod node_count;
pub mod show_span;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -26,4 +26,4 @@ pub use rustc_ast::attr::*;
pub(crate) use rustc_ast::HashStableContext;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -100,7 +100,7 @@ use places_conflict::{places_conflict, PlaceConflictBias};
use region_infer::RegionInferenceContext;
use renumber::RegionCtxt;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
// FIXME(eddyb) perhaps move this somewhere more centrally.
#[derive(Debug)]

View File

@ -56,7 +56,7 @@ pub mod proc_macro_harness;
pub mod standard_library_imports;
pub mod test_harness;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub fn register_builtin_macros(resolver: &mut dyn ResolverExpand) {
let mut register = |name, kind| resolver.register_builtin_macro(name, kind);

View File

@ -87,7 +87,7 @@ use rustc_span::Symbol;
use rustc_span::fatal_error::FatalError;
use tempfile::TempDir;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub struct PrintOnPanic<F: Fn() -> String>(pub F);

View File

@ -84,7 +84,7 @@ mod type_of;
mod va_arg;
mod value;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
#[derive(Clone)]
pub struct LlvmCodegenBackend(());

View File

@ -56,7 +56,7 @@ pub mod mono_item;
pub mod target_features;
pub mod traits;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub struct ModuleCodegen<M> {
/// The name of the module. When the crate may be saved between

View File

@ -39,7 +39,7 @@ use rustc_macros::fluent_messages;
use rustc_middle::ty;
use rustc_middle::ty::query::Providers;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub fn provide(providers: &mut Providers) {
const_eval::provide(providers);

View File

@ -64,7 +64,7 @@ use crate::session_diagnostics::{
RLinkWrongFileType, RlinkNotAFile, RlinkUnableToRead,
};
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub static DEFAULT_LOCALE_RESOURCES: &[&str] = &[
// tidy-alphabetical-start

View File

@ -34,7 +34,7 @@ use intl_memoizer::IntlLangMemoizer;
pub use fluent_bundle::{self, types::FluentType, FluentArgs, FluentError, FluentValue};
pub use unic_langid::{langid, LanguageIdentifier};
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub type FluentBundle = fluent_bundle::bundle::FluentBundle<FluentResource, IntlLangMemoizer>;

View File

@ -76,7 +76,7 @@ pub use snippet::Style;
pub type PErr<'a> = DiagnosticBuilder<'a, ErrorGuaranteed>;
pub type PResult<'a, T> = Result<T, PErr<'a>>;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
// `PResult` is used a lot. Make sure it doesn't unintentionally get bigger.
// (See also the comment on `DiagnosticBuilderInner`'s `diagnostic` field.)

View File

@ -64,4 +64,4 @@ mod mut_visit {
mod tests;
}
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -120,7 +120,7 @@ use std::ops::Not;
use astconv::AstConv;
use bounds::Bounds;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
fn require_c_abi_if_c_variadic(tcx: TyCtxt<'_>, decl: &hir::FnDecl<'_>, abi: Abi, span: Span) {
const CONVENTIONS_UNSTABLE: &str = "`C`, `cdecl`, `win64`, `sysv64` or `efiapi`";

View File

@ -75,7 +75,7 @@ use rustc_session::Session;
use rustc_span::def_id::{DefId, LocalDefId};
use rustc_span::{sym, Span};
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
#[macro_export]
macro_rules! type_error_struct {

View File

@ -35,4 +35,4 @@ pub use persist::{build_dep_graph, load_dep_graph, DepGraphFuture};
use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
use rustc_macros::fluent_messages;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -41,4 +41,4 @@ mod errors;
pub mod infer;
pub mod traits;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -31,4 +31,4 @@ pub use queries::Queries;
#[cfg(test)]
mod tests;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -126,7 +126,7 @@ pub use rustc_session::lint::Level::{self, *};
pub use rustc_session::lint::{BufferedEarlyLint, FutureIncompatibleInfo, Lint, LintId};
pub use rustc_session::lint::{LintArray, LintPass};
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub fn provide(providers: &mut Providers) {
levels::provide(providers);

View File

@ -47,4 +47,4 @@ pub use fs::{emit_wrapper_file, METADATA_FILENAME};
pub use native_libs::find_native_static_library;
pub use rmeta::{encode_metadata, EncodedMetadata, METADATA_HEADER};
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -109,4 +109,4 @@ pub mod util {
// Allows macros to refer to this crate as `::rustc_middle`
extern crate self as rustc_middle;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -28,7 +28,7 @@ use rustc_middle::ty::query::Providers;
use rustc_errors::{DiagnosticMessage, SubdiagnosticMessage};
use rustc_macros::fluent_messages;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub fn provide(providers: &mut Providers) {
providers.check_match = thir::pattern::check_match;

View File

@ -46,7 +46,7 @@ pub mod storage;
pub mod un_derefer;
pub mod value_analysis;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub(crate) mod indexes {
pub(crate) use super::move_paths::MovePathIndex;

View File

@ -23,7 +23,7 @@ mod partitioning;
mod polymorphize;
mod util;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
fn custom_coerce_unsize_info<'tcx>(
tcx: TyCtxtAt<'tcx>,

View File

@ -36,7 +36,7 @@ pub mod validate_attr;
mod errors;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
// A bunch of utility functions of the form `parse_<thing>_from_<source>`
// where <thing> includes crate, expr, item, stmt, tts, and one that

View File

@ -42,7 +42,7 @@ pub mod stability;
mod upvars;
mod weak_lang_items;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub fn provide(providers: &mut Providers) {
check_attr::provide(providers);

View File

@ -18,7 +18,7 @@ use rustc_macros::fluent_messages;
mod errors;
pub mod load;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
/// Structure used to register plugins.
///

View File

@ -46,7 +46,7 @@ use errors::{
UnnamedItemIsPrivate,
};
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
////////////////////////////////////////////////////////////////////////////////
/// Generic infrastructure used to implement specific visitors below.

View File

@ -30,4 +30,4 @@ pub use error::LayoutOfDepth;
pub use error::QueryOverflow;
pub use values::Value;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -81,7 +81,7 @@ mod late;
mod macros;
pub mod rustdoc;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
enum Weak {
Yes,

View File

@ -42,7 +42,7 @@ pub mod output;
pub use getopts;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
/// Requirements for a `StableHashingContext` to be used in this crate.
/// This is a hack to allow using the `HashStable_Generic` derive macro

View File

@ -119,7 +119,7 @@ pub mod errors;
pub mod test;
pub mod typeid;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
/// This function computes the symbol name for the given `instance` and the
/// given instantiating crate. That is, if you know that instance X is

View File

@ -44,4 +44,4 @@ pub mod infer;
pub mod solve;
pub mod traits;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }

View File

@ -33,7 +33,7 @@ pub mod representability;
mod structural_match;
mod ty;
fluent_messages! { "../locales/en-US.ftl" }
fluent_messages! { "../messages.ftl" }
pub fn provide(providers: &mut Providers) {
abi::provide(providers);