From 31a4eae7eac98b29cfe938b48498b24c71ddc925 Mon Sep 17 00:00:00 2001 From: Jules Bertholet Date: Wed, 27 Mar 2024 16:35:40 -0400 Subject: [PATCH] Add rustfmt test for mut ref mut --- tests/source/mut_ref.rs | 10 ++++++++++ tests/target/mut_ref.rs | 10 ++++++++++ 2 files changed, 20 insertions(+) create mode 100644 tests/source/mut_ref.rs create mode 100644 tests/target/mut_ref.rs diff --git a/tests/source/mut_ref.rs b/tests/source/mut_ref.rs new file mode 100644 index 00000000000..18ff33a99ce --- /dev/null +++ b/tests/source/mut_ref.rs @@ -0,0 +1,10 @@ +#![feature(mut_ref)] +fn mut_ref() { + if let Some(mut /*a*/ ref /*def*/ mut /*abc*/ state)= /*abc*/foo{ + println!( +"asdfasdfasdf"); } + +if let Some(mut /*a*/ ref /*def*/ /*mut*/ state)= /*abc*/foo{ + println!( +"asdfasdfasdf"); } +} diff --git a/tests/target/mut_ref.rs b/tests/target/mut_ref.rs new file mode 100644 index 00000000000..16035243791 --- /dev/null +++ b/tests/target/mut_ref.rs @@ -0,0 +1,10 @@ +#![feature(mut_ref)] +fn mut_ref() { + if let Some(mut /*a*/ ref /*def*/ mut /*abc*/ state) = /*abc*/ foo { + println!("asdfasdfasdf"); + } + + if let Some(mut /*a*/ ref /*def*/ /*mut*/ state) = /*abc*/ foo { + println!("asdfasdfasdf"); + } +}