Skip to content

Commit

Permalink
Update test suite to nightly-2022-10-13
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Oct 13, 2022
1 parent 711cd8c commit a807b16
Showing 1 changed file with 4 additions and 4 deletions.
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,8 @@ use rustc_ast::ast::{
WhereClause,
};
use rustc_ast::mut_visit::{self, MutVisitor};
use rustc_error_messages::{DiagnosticMessage, FluentArgs, LazyFallbackBundle};
use rustc_errors::{Diagnostic, PResult};
use rustc_error_messages::{DiagnosticMessage, LazyFallbackBundle};
use rustc_errors::{translation, Diagnostic, PResult};
use rustc_session::parse::ParseSess;
use rustc_span::source_map::FilePathMapping;
use rustc_span::FileName;
Expand Down Expand Up @@ -168,10 +168,10 @@ fn translate_message(diagnostic: &Diagnostic) -> String {
}

let message = &diagnostic.message[0].0;
let args = diagnostic.args().iter().cloned().collect::<FluentArgs>();
let args = translation::to_fluent_args(diagnostic.args());

let (identifier, attr) = match message {
DiagnosticMessage::Str(msg) => return msg.clone(),
DiagnosticMessage::Str(msg) | DiagnosticMessage::Eager(msg) => return msg.clone(),
DiagnosticMessage::FluentIdentifier(identifier, attr) => (identifier, attr),
};

Expand Down

0 comments on commit a807b16

Please sign in to comment.