summaryrefslogtreecommitdiffstats
path: root/src/tools/rustfmt/tests/target/issue-3759.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/rustfmt/tests/target/issue-3759.rs')
-rw-r--r--src/tools/rustfmt/tests/target/issue-3759.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/issue-3759.rs b/src/tools/rustfmt/tests/target/issue-3759.rs
new file mode 100644
index 000000000..b53f5391a
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/issue-3759.rs
@@ -0,0 +1,27 @@
+fn main() {
+ let Test {
+ #[cfg(feature = "test")]
+ x,
+ } = Test {
+ #[cfg(feature = "test")]
+ x: 1,
+ };
+
+ let Test {
+ #[cfg(feature = "test")]
+ // comment
+ x,
+ } = Test {
+ #[cfg(feature = "test")]
+ x: 1,
+ };
+
+ let Test {
+ // comment
+ #[cfg(feature = "test")]
+ x,
+ } = Test {
+ #[cfg(feature = "test")]
+ x: 1,
+ };
+}