2018-10-30 20:21:23 +00:00
|
|
|
error: use of `expect` followed by a function call
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:36:26
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
36 | with_none_and_format.expect(&format!("Error {}: fake error", error_code));
|
2018-10-30 20:21:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Error {}: fake error", error_code))`
|
|
|
|
|
|
|
|
|
= note: `-D clippy::expect-fun-call` implied by `-D warnings`
|
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:39:26
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
39 | with_none_and_as_str.expect(format!("Error {}: fake error", error_code).as_str());
|
2018-10-30 20:21:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Error {}: fake error", error_code))`
|
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:49:25
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
49 | with_err_and_format.expect(&format!("Error {}: fake error", error_code));
|
2018-10-30 20:21:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("Error {}: fake error", error_code))`
|
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:52:25
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
52 | with_err_and_as_str.expect(format!("Error {}: fake error", error_code).as_str());
|
2018-10-30 20:21:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| panic!("Error {}: fake error", error_code))`
|
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:67:17
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
67 | Some("foo").expect({ &format!("error") });
|
2018-10-30 20:21:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { let msg = { &format!("error") }; panic!(msg) }))`
|
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2018-12-10 05:27:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:68:17
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-10 05:27:19 +00:00
|
|
|
68 | Some("foo").expect(format!("error").as_ref());
|
2018-10-30 20:21:23 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("error"))`
|
|
|
|
|
|
|
|
error: aborting due to 6 previous errors
|
|
|
|
|