Skip to content

Commit 976f290

Browse files
committed
fix expected error message in test.
1 parent 2027fbf commit 976f290

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/test/compile-fail/issue-22932.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Issue 22932: `panic!("{}");` should not compile.
1414

1515
pub fn f1() { panic!("this does not work {}");
16-
//~^ WARN unary panic! literal argument contains `{`
16+
//~^ WARN unary `panic!` literal argument contains `{`
1717
//~| NOTE Is it meant to be a `format!` string?
1818
//~| HELP You can wrap the argument in parentheses to sidestep this warning
1919
}
@@ -28,25 +28,25 @@ pub fn workaround_2() {
2828
}
2929

3030
pub fn f2() { panic!("this does not work {");
31-
//~^ WARN unary panic! literal argument contains `{`
31+
//~^ WARN unary `panic!` literal argument contains `{`
3232
//~| NOTE Is it meant to be a `format!` string?
3333
//~| HELP You can wrap the argument in parentheses to sidestep this warning
3434
}
3535

3636
pub fn f3() { panic!("nor this }");
37-
//~^ WARN unary panic! literal argument contains `}`
37+
//~^ WARN unary `panic!` literal argument contains `}`
3838
//~| NOTE Is it meant to be a `format!` string?
3939
//~| HELP You can wrap the argument in parentheses to sidestep this warning
4040
}
4141

4242
pub fn f4() { panic!("nor this {{");
43-
//~^ WARN unary panic! literal argument contains `{`
43+
//~^ WARN unary `panic!` literal argument contains `{`
4444
//~| NOTE Is it meant to be a `format!` string?
4545
//~| HELP You can wrap the argument in parentheses to sidestep this warning
4646
}
4747

4848
pub fn f5() { panic!("nor this }}");
49-
//~^ WARN unary panic! literal argument contains `}`
49+
//~^ WARN unary `panic!` literal argument contains `}`
5050
//~| NOTE Is it meant to be a `format!` string?
5151
//~| HELP You can wrap the argument in parentheses to sidestep this warning
5252
}

0 commit comments

Comments
 (0)