@@ -67,40 +67,52 @@ LL | map.entry(42).or_insert(String::new());
67
67
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(String::new)`
68
68
69
69
error: use of `or_insert` followed by a function call
70
- --> $DIR/or_fun_call.rs:66:21
70
+ --> $DIR/or_fun_call.rs:66:23
71
+ |
72
+ LL | map_vec.entry(42).or_insert(vec![]);
73
+ | ^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(Vec::new)`
74
+
75
+ error: use of `or_insert` followed by a function call
76
+ --> $DIR/or_fun_call.rs:69:21
71
77
|
72
78
LL | btree.entry(42).or_insert(String::new());
73
79
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(String::new)`
74
80
81
+ error: use of `or_insert` followed by a function call
82
+ --> $DIR/or_fun_call.rs:72:25
83
+ |
84
+ LL | btree_vec.entry(42).or_insert(vec![]);
85
+ | ^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(Vec::new)`
86
+
75
87
error: use of `unwrap_or` followed by a function call
76
- --> $DIR/or_fun_call.rs:69 :21
88
+ --> $DIR/or_fun_call.rs:75 :21
77
89
|
78
90
LL | let _ = stringy.unwrap_or("".to_owned());
79
91
| ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_owned())`
80
92
81
93
error: use of `unwrap_or` followed by a function call
82
- --> $DIR/or_fun_call.rs:77 :21
94
+ --> $DIR/or_fun_call.rs:83 :21
83
95
|
84
96
LL | let _ = Some(1).unwrap_or(map[&1]);
85
97
| ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| map[&1])`
86
98
87
99
error: use of `unwrap_or` followed by a function call
88
- --> $DIR/or_fun_call.rs:79 :21
100
+ --> $DIR/or_fun_call.rs:85 :21
89
101
|
90
102
LL | let _ = Some(1).unwrap_or(map[&1]);
91
103
| ^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| map[&1])`
92
104
93
105
error: use of `or` followed by a function call
94
- --> $DIR/or_fun_call.rs:103 :35
106
+ --> $DIR/or_fun_call.rs:109 :35
95
107
|
96
108
LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
97
109
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some("b".to_string()))`
98
110
99
111
error: use of `or` followed by a function call
100
- --> $DIR/or_fun_call.rs:107 :10
112
+ --> $DIR/or_fun_call.rs:113 :10
101
113
|
102
114
LL | .or(Some(Bar(b, Duration::from_secs(2))));
103
115
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some(Bar(b, Duration::from_secs(2))))`
104
116
105
- error: aborting due to 17 previous errors
117
+ error: aborting due to 19 previous errors
106
118
0 commit comments