summaryrefslogtreecommitdiffstats
path: root/vendor/syn/tests/macros
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:59:35 +0000
commitd1b2d29528b7794b41e66fc2136e395a02f8529b (patch)
treea4a17504b260206dec3cf55b2dca82929a348ac2 /vendor/syn/tests/macros
parentReleasing progress-linux version 1.72.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.tar.xz
rustc-d1b2d29528b7794b41e66fc2136e395a02f8529b.zip
Merging upstream version 1.73.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/syn/tests/macros')
-rw-r--r--vendor/syn/tests/macros/mod.rs15
1 files changed, 12 insertions, 3 deletions
diff --git a/vendor/syn/tests/macros/mod.rs b/vendor/syn/tests/macros/mod.rs
index 5ca88b083..3bfbe0389 100644
--- a/vendor/syn/tests/macros/mod.rs
+++ b/vendor/syn/tests/macros/mod.rs
@@ -38,14 +38,20 @@ macro_rules! snapshot_impl {
let $expr = crate::macros::Tokens::parse::<$t>($expr).unwrap();
let debug = crate::macros::debug::Lite(&$expr);
if !cfg!(miri) {
- insta::assert_debug_snapshot!(debug, @$snapshot);
+ #[allow(clippy::needless_raw_string_hashes)] // https://github.com/mitsuhiko/insta/issues/389
+ {
+ insta::assert_debug_snapshot!(debug, @$snapshot);
+ }
}
};
(($($expr:tt)*) as $t:ty, @$snapshot:literal) => {{
let syntax_tree = crate::macros::Tokens::parse::<$t>($($expr)*).unwrap();
let debug = crate::macros::debug::Lite(&syntax_tree);
if !cfg!(miri) {
- insta::assert_debug_snapshot!(debug, @$snapshot);
+ #[allow(clippy::needless_raw_string_hashes)]
+ {
+ insta::assert_debug_snapshot!(debug, @$snapshot);
+ }
}
syntax_tree
}};
@@ -53,7 +59,10 @@ macro_rules! snapshot_impl {
let syntax_tree = $($expr)*;
let debug = crate::macros::debug::Lite(&syntax_tree);
if !cfg!(miri) {
- insta::assert_debug_snapshot!(debug, @$snapshot);
+ #[allow(clippy::needless_raw_string_hashes)]
+ {
+ insta::assert_debug_snapshot!(debug, @$snapshot);
+ }
}
syntax_tree
}};