2018-10-30 20:21:23 +00:00
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:35:26
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:38:26
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:41:37
|
|
|
|
|
|
|
|
|
LL | with_none_and_format_with_macro.expect(format!("Error {}: fake error", one!()).as_str());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("Error {}: fake error", one!()))`
|
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
|
|
|
--> $DIR/expect_fun_call.rs:51:25
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:54:25
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2018-12-27 15:57:55 +00:00
|
|
|
LL | 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
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:66:17
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2019-01-24 04:58:53 +00:00
|
|
|
LL | Some("foo").expect(format!("{} {}", 1, 2).as_ref());
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{} {}", 1, 2))`
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:87:21
|
2018-10-30 20:21:23 +00:00
|
|
|
|
|
2019-01-24 04:58:53 +00:00
|
|
|
LL | Some("foo").expect(&get_string());
|
2021-02-03 09:55:33 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
|
2018-10-30 20:21:23 +00:00
|
|
|
|
2019-01-19 12:13:06 +00:00
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:88:21
|
2019-01-19 12:13:06 +00:00
|
|
|
|
|
2019-01-24 04:58:53 +00:00
|
|
|
LL | Some("foo").expect(get_string().as_ref());
|
2021-02-03 09:55:33 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
|
2019-01-24 04:58:53 +00:00
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:89:21
|
2019-01-24 04:58:53 +00:00
|
|
|
|
|
|
|
|
LL | Some("foo").expect(get_string().as_str());
|
2021-02-03 09:55:33 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_string()) })`
|
2019-01-24 04:58:53 +00:00
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:91:21
|
2019-01-24 04:58:53 +00:00
|
|
|
|
|
|
|
|
LL | Some("foo").expect(get_static_str());
|
2021-02-03 09:55:33 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_static_str()) })`
|
2019-01-24 04:58:53 +00:00
|
|
|
|
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:92:21
|
2019-01-24 04:58:53 +00:00
|
|
|
|
|
|
|
|
LL | Some("foo").expect(get_non_static_str(&0));
|
2021-02-03 09:55:33 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!("{}", get_non_static_str(&0).to_string()) })`
|
2019-01-19 12:13:06 +00:00
|
|
|
|
2019-03-06 05:00:05 +00:00
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:96:16
|
2019-03-06 05:00:05 +00:00
|
|
|
|
|
|
|
|
LL | Some(true).expect(&format!("key {}, {}", 1, 2));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("key {}, {}", 1, 2))`
|
|
|
|
|
2019-12-18 19:54:37 +00:00
|
|
|
error: use of `expect` followed by a function call
|
2022-01-28 14:42:19 +00:00
|
|
|
--> $DIR/expect_fun_call.rs:102:17
|
2019-12-18 19:54:37 +00:00
|
|
|
|
|
|
|
|
LL | opt_ref.expect(&format!("{:?}", opt_ref));
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{:?}", opt_ref))`
|
|
|
|
|
2022-01-28 14:42:19 +00:00
|
|
|
error: aborting due to 13 previous errors
|
2018-10-30 20:21:23 +00:00
|
|
|
|