diff options
| author | Jules Bertholet <julesbertholet@quoi.xyz> | 2024-03-27 16:35:40 -0400 |
|---|---|---|
| committer | Jules Bertholet <julesbertholet@quoi.xyz> | 2024-03-27 16:38:56 -0400 |
| commit | 31a4eae7eac98b29cfe938b48498b24c71ddc925 (patch) | |
| tree | 4638a64753aaff1b03b8243ee70f11e5c5ee0594 | |
| parent | 645b94c1555e2ede79095a0385c6ad24ae7e5419 (diff) | |
| download | rust-31a4eae7eac98b29cfe938b48498b24c71ddc925.tar.gz rust-31a4eae7eac98b29cfe938b48498b24c71ddc925.zip | |
Add rustfmt test for mut ref mut
| -rw-r--r-- | tests/source/mut_ref.rs | 10 | ||||
| -rw-r--r-- | tests/target/mut_ref.rs | 10 |
2 files changed, 20 insertions, 0 deletions
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"); + } +} |
