X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;ds=sidebyside;f=tests%2Fui%2Fexpect_fun_call.stderr;h=a492e2df89d47809d96edacb664f3310e8ccad37;hb=a0e9f9bd0dca39ccff47baedffa94aca74911a86;hp=900e251d964c20b2b91da0ee38fa3363c804214b;hpb=33a0fe7b2cd62ae61593b2504cb8deaa3fab61c4;p=rust.git diff --git a/tests/ui/expect_fun_call.stderr b/tests/ui/expect_fun_call.stderr index 900e251d964..a492e2df89d 100644 --- a/tests/ui/expect_fun_call.stderr +++ b/tests/ui/expect_fun_call.stderr @@ -60,5 +60,17 @@ error: use of `expect` followed by a function call LL | Some("foo").expect(get_non_static_str(&0)); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| { panic!(get_non_static_str(&0).to_string()) })` -error: aborting due to 10 previous errors +error: use of `expect` followed by a function call + --> $DIR/expect_fun_call.rs:86:16 + | +LL | Some(true).expect(&format!("key {}, {}", 1, 2)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("key {}, {}", 1, 2))` + +error: use of `expect` followed by a function call + --> $DIR/expect_fun_call.rs:92:17 + | +LL | opt_ref.expect(&format!("{:?}", opt_ref)); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{:?}", opt_ref))` + +error: aborting due to 12 previous errors