@@ -34,31 +34,31 @@ error: use of `expect` followed by a function call
34
34
--> $DIR/expect_fun_call.rs:77:21
35
35
|
36
36
LL | Some("foo").expect(&get_string());
37
- | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!(get_string()) })`
37
+ | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
38
38
39
39
error: use of `expect` followed by a function call
40
40
--> $DIR/expect_fun_call.rs:78:21
41
41
|
42
42
LL | Some("foo").expect(get_string().as_ref());
43
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!(get_string()) })`
43
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
44
44
45
45
error: use of `expect` followed by a function call
46
46
--> $DIR/expect_fun_call.rs:79:21
47
47
|
48
48
LL | Some("foo").expect(get_string().as_str());
49
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!(get_string()) })`
49
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
50
50
51
51
error: use of `expect` followed by a function call
52
52
--> $DIR/expect_fun_call.rs:81:21
53
53
|
54
54
LL | Some("foo").expect(get_static_str());
55
- | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!(get_static_str()) })`
55
+ | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_static_str()) })`
56
56
57
57
error: use of `expect` followed by a function call
58
58
--> $DIR/expect_fun_call.rs:82:21
59
59
|
60
60
LL | Some("foo").expect(get_non_static_str(&0));
61
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!(get_non_static_str(&0).to_string()) })`
61
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_non_static_str(&0).to_string()) })`
62
62
63
63
error: use of `expect` followed by a function call
64
64
--> $DIR/expect_fun_call.rs:86:16
0 commit comments