Skip to content

Commit

Permalink
Update test suite to nightly-2022-04-14
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Apr 14, 2022
1 parent 9fd668c commit fd145a9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion benches/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}
}
Expand Down
8 changes: 4 additions & 4 deletions tests/test_round_trip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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)
};
}

Expand Down

0 comments on commit fd145a9

Please sign in to comment.