mirror of
https://gitee.com/openharmony/third_party_rust_syn
synced 2024-11-23 16:00:10 +00:00
Update test suite to nightly-2022-04-14
This commit is contained in:
parent
9fd668c666
commit
fd145a99a7
@ -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");
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user