]> git.lizzy.rs Git - rust.git/blob - tests/ui/unwrap_or_else_default.stderr
Auto merge of #9684 - kraktus:ref_option_ref, r=xFrednet
[rust.git] / tests / ui / unwrap_or_else_default.stderr
1 error: use of `.unwrap_or_else(..)` to construct default value
2   --> $DIR/unwrap_or_else_default.rs:48:5
3    |
4 LL |     with_new.unwrap_or_else(Vec::new);
5    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `with_new.unwrap_or_default()`
6    |
7    = note: `-D clippy::unwrap-or-else-default` implied by `-D warnings`
8
9 error: use of `.unwrap_or_else(..)` to construct default value
10   --> $DIR/unwrap_or_else_default.rs:62:5
11    |
12 LL |     with_real_default.unwrap_or_else(<HasDefaultAndDuplicate as Default>::default);
13    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `with_real_default.unwrap_or_default()`
14
15 error: use of `.unwrap_or_else(..)` to construct default value
16   --> $DIR/unwrap_or_else_default.rs:65:5
17    |
18 LL |     with_default_trait.unwrap_or_else(Default::default);
19    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `with_default_trait.unwrap_or_default()`
20
21 error: use of `.unwrap_or_else(..)` to construct default value
22   --> $DIR/unwrap_or_else_default.rs:68:5
23    |
24 LL |     with_default_type.unwrap_or_else(u64::default);
25    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `with_default_type.unwrap_or_default()`
26
27 error: use of `.unwrap_or_else(..)` to construct default value
28   --> $DIR/unwrap_or_else_default.rs:71:5
29    |
30 LL |     with_default_type.unwrap_or_else(Vec::new);
31    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `with_default_type.unwrap_or_default()`
32
33 error: use of `.unwrap_or_else(..)` to construct default value
34   --> $DIR/unwrap_or_else_default.rs:74:5
35    |
36 LL |     empty_string.unwrap_or_else(|| "".to_string());
37    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `empty_string.unwrap_or_default()`
38
39 error: aborting due to 6 previous errors
40