Skip to content

Commit

Permalink
Update test suite to nightly-2023-12-24
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 24, 2023
1 parent edeb6a0 commit d4012a7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions tests/common/eq.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ use rustc_ast::ast::Param;
use rustc_ast::ast::ParenthesizedArgs;
use rustc_ast::ast::Pat;
use rustc_ast::ast::PatField;
use rustc_ast::ast::PatFieldsRest;
use rustc_ast::ast::PatKind;
use rustc_ast::ast::Path;
use rustc_ast::ast::PathSegment;
Expand Down Expand Up @@ -569,6 +570,7 @@ spanless_eq_enum!(MacStmtStyle; Semicolon Braces NoBraces);
spanless_eq_enum!(ModKind; Loaded(0 1 2) Unloaded);
spanless_eq_enum!(Movability; Static Movable);
spanless_eq_enum!(Mutability; Mut Not);
spanless_eq_enum!(PatFieldsRest; Rest None);
spanless_eq_enum!(RangeEnd; Included(0) Excluded);
spanless_eq_enum!(RangeLimits; HalfOpen Closed);
spanless_eq_enum!(StmtKind; Local(0) Item(0) Expr(0) Semi(0) Empty MacCall(0));
Expand Down
6 changes: 3 additions & 3 deletions tests/test_round_trip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ fn translate_message(diagnostic: &Diagnostic) -> Cow<'static, str> {
};
}

let message = &diagnostic.message[0].0;
let message = &diagnostic.messages[0].0;
let args = translation::to_fluent_args(diagnostic.args());

let (identifier, attr) = match message {
Expand All @@ -175,11 +175,11 @@ fn translate_message(diagnostic: &Diagnostic) -> Cow<'static, str> {

FLUENT_BUNDLE.with(|fluent_bundle| {
let message = fluent_bundle
.get_message(identifier)
.get_message(&identifier)
.expect("missing diagnostic in fluent bundle");
let value = match attr {
Some(attr) => message
.get_attribute(attr)
.get_attribute(&attr)
.expect("missing attribute in fluent message")
.value(),
None => message.value().expect("missing value in fluent message"),
Expand Down

0 comments on commit d4012a7

Please sign in to comment.