summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/cargo-fmt/source/issue_3164
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/cargo-fmt/source/issue_3164')
-rw-r--r--src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/Cargo.toml8
-rw-r--r--src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/src/main.rs13
2 files changed, 21 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/Cargo.toml b/src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/Cargo.toml
new file mode 100644
index 000000000..580ef7e6e
--- /dev/null
+++ b/src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/Cargo.toml
@@ -0,0 +1,8 @@
+[package]
+name = "issue_3164"
+version = "0.1.0"
+edition = "2021"
+
+# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
+
+[dependencies]
diff --git a/src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/src/main.rs b/src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/src/main.rs
new file mode 100644
index 000000000..9330107ac
--- /dev/null
+++ b/src/tools/rustfmt/tests/cargo-fmt/source/issue_3164/src/main.rs
@@ -0,0 +1,13 @@
+#[allow(unused_macros)]
+macro_rules! foo {
+ ($id:ident) => {
+ macro_rules! bar {
+ ($id2:tt) => {
+ #[cfg(any(target_feature = $id2, target_feature = $id2, target_feature = $id2, target_feature = $id2, target_feature = $id2))]
+ fn $id() {}
+ };
+ }
+ };
+}
+
+fn main() {}