1 error: use of `unwrap_or` followed by a function call
2 --> $DIR/or_fun_call.rs:32:19
4 LL | with_const_fn.unwrap_or(Duration::from_secs(5));
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| Duration::from_secs(5))`
7 = note: `-D clippy::or-fun-call` implied by `-D warnings`
9 error: use of `unwrap_or` followed by a function call
10 --> $DIR/or_fun_call.rs:35:22
12 LL | with_constructor.unwrap_or(make());
13 | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(make)`
15 error: use of `unwrap_or` followed by a call to `new`
16 --> $DIR/or_fun_call.rs:38:5
18 LL | with_new.unwrap_or(Vec::new());
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `with_new.unwrap_or_default()`
21 error: use of `unwrap_or` followed by a function call
22 --> $DIR/or_fun_call.rs:41:21
24 LL | with_const_args.unwrap_or(Vec::with_capacity(12));
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| Vec::with_capacity(12))`
27 error: use of `unwrap_or` followed by a function call
28 --> $DIR/or_fun_call.rs:44:14
30 LL | with_err.unwrap_or(make());
31 | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| make())`
33 error: use of `unwrap_or` followed by a function call
34 --> $DIR/or_fun_call.rs:47:19
36 LL | with_err_args.unwrap_or(Vec::with_capacity(12));
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|_| Vec::with_capacity(12))`
39 error: use of `unwrap_or` followed by a call to `default`
40 --> $DIR/or_fun_call.rs:50:5
42 LL | with_default_trait.unwrap_or(Default::default());
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `with_default_trait.unwrap_or_default()`
45 error: use of `unwrap_or` followed by a call to `default`
46 --> $DIR/or_fun_call.rs:53:5
48 LL | with_default_type.unwrap_or(u64::default());
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `with_default_type.unwrap_or_default()`
51 error: use of `unwrap_or` followed by a call to `new`
52 --> $DIR/or_fun_call.rs:56:5
54 LL | with_vec.unwrap_or(vec![]);
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `with_vec.unwrap_or_default()`
57 error: use of `unwrap_or` followed by a function call
58 --> $DIR/or_fun_call.rs:59:21
60 LL | without_default.unwrap_or(Foo::new());
61 | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(Foo::new)`
63 error: use of `unwrap_or` followed by a function call
64 --> $DIR/or_fun_call.rs:62:21
66 LL | let _ = stringy.unwrap_or("".to_owned());
67 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_owned())`
69 error: use of `or` followed by a function call
70 --> $DIR/or_fun_call.rs:87:35
72 LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
73 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some("b".to_string()))`
75 error: use of `or` followed by a function call
76 --> $DIR/or_fun_call.rs:91:10
78 LL | .or(Some(Bar(b, Duration::from_secs(2))));
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some(Bar(b, Duration::from_secs(2))))`
81 error: aborting due to 13 previous errors