13
13
// Issue 22932: `panic!("{}");` should not compile.
14
14
15
15
pub fn f1 ( ) { panic ! ( "this does not work {}" ) ;
16
- //~^ WARN unary panic! literal argument contains `{`
16
+ //~^ WARN unary ` panic!` literal argument contains `{`
17
17
//~| NOTE Is it meant to be a `format!` string?
18
18
//~| HELP You can wrap the argument in parentheses to sidestep this warning
19
19
}
@@ -28,25 +28,25 @@ pub fn workaround_2() {
28
28
}
29
29
30
30
pub fn f2 ( ) { panic ! ( "this does not work {" ) ;
31
- //~^ WARN unary panic! literal argument contains `{`
31
+ //~^ WARN unary ` panic!` literal argument contains `{`
32
32
//~| NOTE Is it meant to be a `format!` string?
33
33
//~| HELP You can wrap the argument in parentheses to sidestep this warning
34
34
}
35
35
36
36
pub fn f3 ( ) { panic ! ( "nor this }" ) ;
37
- //~^ WARN unary panic! literal argument contains `}`
37
+ //~^ WARN unary ` panic!` literal argument contains `}`
38
38
//~| NOTE Is it meant to be a `format!` string?
39
39
//~| HELP You can wrap the argument in parentheses to sidestep this warning
40
40
}
41
41
42
42
pub fn f4 ( ) { panic ! ( "nor this {{" ) ;
43
- //~^ WARN unary panic! literal argument contains `{`
43
+ //~^ WARN unary ` panic!` literal argument contains `{`
44
44
//~| NOTE Is it meant to be a `format!` string?
45
45
//~| HELP You can wrap the argument in parentheses to sidestep this warning
46
46
}
47
47
48
48
pub fn f5 ( ) { panic ! ( "nor this }}" ) ;
49
- //~^ WARN unary panic! literal argument contains `}`
49
+ //~^ WARN unary ` panic!` literal argument contains `}`
50
50
//~| NOTE Is it meant to be a `format!` string?
51
51
//~| HELP You can wrap the argument in parentheses to sidestep this warning
52
52
}
0 commit comments