summaryrefslogtreecommitdiffstats
path: root/src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:18:58 +0000
commita4b7ed7a42c716ab9f05e351f003d589124fd55d (patch)
treeb620cd3f223850b28716e474e80c58059dca5dd4 /src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs
parentAdding upstream version 1.67.1+dfsg1. (diff)
downloadrustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.tar.xz
rustc-a4b7ed7a42c716ab9f05e351f003d589124fd55d.zip
Adding upstream version 1.68.2+dfsg1.upstream/1.68.2+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs')
-rw-r--r--src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs b/src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs
index 4e04d2bc1..c1a608365 100644
--- a/src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs
+++ b/src/tools/rust-analyzer/crates/mbe/src/syntax_bridge/tests.rs
@@ -19,7 +19,7 @@ fn check_punct_spacing(fixture: &str) {
let spacing = match annotation.as_str() {
"Alone" => Spacing::Alone,
"Joint" => Spacing::Joint,
- a => panic!("unknown annotation: {}", a),
+ a => panic!("unknown annotation: {a}"),
};
(token, spacing)
})
@@ -30,7 +30,7 @@ fn check_punct_spacing(fixture: &str) {
while !cursor.eof() {
while let Some(token_tree) = cursor.token_tree() {
if let TokenTreeRef::Leaf(Leaf::Punct(Punct { spacing, id, .. }), _) = token_tree {
- if let Some(expected) = annotations.remove(&id) {
+ if let Some(expected) = annotations.remove(id) {
assert_eq!(expected, *spacing);
}
}
@@ -39,7 +39,7 @@ fn check_punct_spacing(fixture: &str) {
cursor = cursor.bump();
}
- assert!(annotations.is_empty(), "unchecked annotations: {:?}", annotations);
+ assert!(annotations.is_empty(), "unchecked annotations: {annotations:?}");
}
#[test]