Skip to content

Commit

Permalink
Add rustfmt test for mut ref mut
Browse files Browse the repository at this point in the history
  • Loading branch information
Jules-Bertholet committed Mar 27, 2024
1 parent 528d45a commit e931595
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/tools/rustfmt/tests/source/mut_ref.rs
Original file line number Diff line number Diff line change
@@ -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"); }
}
10 changes: 10 additions & 0 deletions src/tools/rustfmt/tests/target/mut_ref.rs
Original file line number Diff line number Diff line change
@@ -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");
}
}

0 comments on commit e931595

Please sign in to comment.