@@ -42,38 +42,38 @@ error: use of `unwrap_or` followed by a call to `default`
4242LL | with_default_type.unwrap_or(u64::default());
4343 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `with_default_type.unwrap_or_default()`
4444
45- error: use of `unwrap_or` followed by a function call
46- --> $DIR/or_fun_call.rs:56:14
45+ error: use of `unwrap_or` followed by a call to `new`
46+ --> $DIR/or_fun_call.rs:56:5
4747 |
4848LL | with_vec.unwrap_or(vec![]);
49- | ^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| vec![] )`
49+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `with_vec.unwrap_or_default( )`
5050
5151error: use of `unwrap_or` followed by a function call
52- --> $DIR/or_fun_call.rs:61 :21
52+ --> $DIR/or_fun_call.rs:59 :21
5353 |
5454LL | without_default.unwrap_or(Foo::new());
5555 | ^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(Foo::new)`
5656
5757error: use of `or_insert` followed by a function call
58- --> $DIR/or_fun_call.rs:64 :19
58+ --> $DIR/or_fun_call.rs:62 :19
5959 |
6060LL | map.entry(42).or_insert(String::new());
6161 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(String::new)`
6262
6363error: use of `or_insert` followed by a function call
64- --> $DIR/or_fun_call.rs:67 :21
64+ --> $DIR/or_fun_call.rs:65 :21
6565 |
6666LL | btree.entry(42).or_insert(String::new());
6767 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_insert_with(String::new)`
6868
6969error: use of `unwrap_or` followed by a function call
70- --> $DIR/or_fun_call.rs:70 :21
70+ --> $DIR/or_fun_call.rs:68 :21
7171 |
7272LL | let _ = stringy.unwrap_or("".to_owned());
7373 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| "".to_owned())`
7474
7575error: use of `or` followed by a function call
76- --> $DIR/or_fun_call.rs:95 :35
76+ --> $DIR/or_fun_call.rs:93 :35
7777 |
7878LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
7979 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `or_else(|| Some("b".to_string()))`
0 commit comments