@@ -34,31 +34,31 @@ error: use of `expect` followed by a function call
3434 --> $DIR/expect_fun_call.rs:77:21
3535 |
3636LL | 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()) })`
3838
3939error: use of `expect` followed by a function call
4040 --> $DIR/expect_fun_call.rs:78:21
4141 |
4242LL | 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()) })`
4444
4545error: use of `expect` followed by a function call
4646 --> $DIR/expect_fun_call.rs:79:21
4747 |
4848LL | 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()) })`
5050
5151error: use of `expect` followed by a function call
5252 --> $DIR/expect_fun_call.rs:81:21
5353 |
5454LL | 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()) })`
5656
5757error: use of `expect` followed by a function call
5858 --> $DIR/expect_fun_call.rs:82:21
5959 |
6060LL | 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()) })`
6262
6363error: use of `expect` followed by a function call
6464 --> $DIR/expect_fun_call.rs:86:16
0 commit comments