From 698f8c2f01ea549d77d7dc3338a12e04c11057b9 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:02:58 +0200 Subject: Adding upstream version 1.64.0+dfsg1. Signed-off-by: Daniel Baumann --- src/tools/rustfmt/tests/source/issue-3434/lib.rs | 57 ++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 src/tools/rustfmt/tests/source/issue-3434/lib.rs (limited to 'src/tools/rustfmt/tests/source/issue-3434/lib.rs') diff --git a/src/tools/rustfmt/tests/source/issue-3434/lib.rs b/src/tools/rustfmt/tests/source/issue-3434/lib.rs new file mode 100644 index 000000000..7e396b383 --- /dev/null +++ b/src/tools/rustfmt/tests/source/issue-3434/lib.rs @@ -0,0 +1,57 @@ +#![rustfmt::skip::macros(skip_macro_mod)] + +mod no_entry; + +#[rustfmt::skip::macros(html, skip_macro)] +fn main() { + let macro_result1 = html! {
+this should be skipped
+ } + .to_string(); + + let macro_result2 = not_skip_macro! {
+this should be mangled
+ } + .to_string(); + + skip_macro! { +this should be skipped +}; + + foo(); +} + +fn foo() { + let macro_result1 = html! {
+this should be mangled
+ } + .to_string(); +} + +fn bar() { + let macro_result1 = skip_macro_mod! {
+this should be skipped
+ } + .to_string(); +} + +fn visitor_made_from_same_context() { + let pair = ( + || { + foo!(
+this should be mangled
+ ); + skip_macro_mod!(
+this should be skipped
+ ); + }, + || { + foo!(
+this should be mangled
+ ); + skip_macro_mod!(
+this should be skipped
+ ); + }, + ); +} -- cgit v1.2.3