Skip to content

Commit 025bc0e

Browse files
Add rustfmt test for mut ref mut
1 parent 5300f87 commit 025bc0e

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

src/tools/rustfmt/tests/source/issue_3853.rs

+10
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,13 @@ if let Some(ref /*def*/ mut /*abc*/ state)= /*abc*/foo{
5050
println!(
5151
"asdfasdfasdf"); }
5252
}
53+
54+
fn mut_ref_mut() {
55+
if let Some(mut /*a*/ ref /*def*/ mut /*abc*/ state)= /*abc*/foo{
56+
println!(
57+
"asdfasdfasdf"); }
58+
59+
if let Some(mut /*a*/ ref /*def*/ /*mut*/ state)= /*abc*/foo{
60+
println!(
61+
"asdfasdfasdf"); }
62+
}

src/tools/rustfmt/tests/target/issue_3853.rs

+10
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,13 @@ fn block_comment_between_lhs_and_rhs() {
4545
println!("asdfasdfasdf");
4646
}
4747
}
48+
49+
fn mut_ref_mut() {
50+
if let Some(mut /*a*/ ref /*def*/ mut /*abc*/ state) = /*abc*/ foo {
51+
println!("asdfasdfasdf");
52+
}
53+
54+
if let Some(mut /*a*/ ref /*def*/ /*mut*/ state) = /*abc*/ foo {
55+
println!("asdfasdfasdf");
56+
}
57+
}

0 commit comments

Comments
 (0)