@@ -78,17 +78,35 @@ error: use of `unwrap_or` followed by a function call
78
78
LL | let _ = stringy.unwrap_or("".to_owned());
79
79
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_owned())`
80
80
81
+ error: use of `unwrap_or` followed by a function call
82
+ --> $DIR/or_fun_call.rs:75:22
83
+ |
84
+ LL | let _ = Some(&1).unwrap_or(&make());
85
+ | ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| &make())`
86
+
87
+ error: use of `unwrap_or` followed by a function call
88
+ --> $DIR/or_fun_call.rs:78:21
89
+ |
90
+ LL | let _ = Some(1).unwrap_or(map[&1]);
91
+ | ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| map[&1])`
92
+
93
+ error: use of `unwrap_or` followed by a function call
94
+ --> $DIR/or_fun_call.rs:80:22
95
+ |
96
+ LL | let _ = Some(&1).unwrap_or(&map[&1]);
97
+ | ^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| &map[&1])`
98
+
81
99
error: use of `or` followed by a function call
82
- --> $DIR/or_fun_call.rs:93 :35
100
+ --> $DIR/or_fun_call.rs:101 :35
83
101
|
84
102
LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
85
103
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some("b".to_string()))`
86
104
87
105
error: use of `or` followed by a function call
88
- --> $DIR/or_fun_call.rs:97 :10
106
+ --> $DIR/or_fun_call.rs:105 :10
89
107
|
90
108
LL | .or(Some(Bar(b, Duration::from_secs(2))));
91
109
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some(Bar(b, Duration::from_secs(2))))`
92
110
93
- error: aborting due to 15 previous errors
111
+ error: aborting due to 18 previous errors
94
112
0 commit comments