Update test suite to nightly-2022-04-14

This commit is contained in:
David Tolnay 2022-04-13 19:42:57 -07:00
parent 9fd668c666
commit fd145a99a7
No known key found for this signature in database
GPG Key ID: F9BA143B95FF6D82
2 changed files with 5 additions and 5 deletions

View File

@ -62,7 +62,7 @@ mod librustc_parse {
fn fluent_bundle(&self) -> Option<&Lrc<FluentBundle>> {
None
}
fn fallback_fluent_bundle(&self) -> &Lrc<FluentBundle> {
fn fallback_fluent_bundle(&self) -> &FluentBundle {
panic!("silent emitter attempted to translate a diagnostic");
}
}

View File

@ -21,8 +21,7 @@ use rustc_ast::ast::{
WhereClause,
};
use rustc_ast::mut_visit::{self, MutVisitor};
use rustc_data_structures::sync::Lrc;
use rustc_error_messages::{DiagnosticMessage, FluentArgs, FluentBundle};
use rustc_error_messages::{DiagnosticMessage, FluentArgs, LazyFallbackBundle};
use rustc_errors::{Diagnostic, PResult};
use rustc_session::parse::ParseSess;
use rustc_span::source_map::FilePathMapping;
@ -161,9 +160,10 @@ fn librustc_parse(content: String, sess: &ParseSess) -> PResult<Crate> {
fn translate_message(diagnostic: &Diagnostic) -> String {
thread_local! {
static FLUENT_BUNDLE: Lrc<FluentBundle> = {
static FLUENT_BUNDLE: LazyFallbackBundle = {
let resources = rustc_error_messages::DEFAULT_LOCALE_RESOURCES;
let with_directionality_markers = false;
rustc_error_messages::fallback_fluent_bundle(with_directionality_markers).unwrap()
rustc_error_messages::fallback_fluent_bundle(resources, with_directionality_markers)
};
}