summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/unwrap_or_else_default.stderr
blob: 3119aba19e8fd4693e8bc1a43eb663d170c9266e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:46:14
   |
LL |     with_new.unwrap_or_else(Vec::new);
   |              ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
   |
   = note: `-D clippy::unwrap-or-default` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::unwrap_or_default)]`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:60:23
   |
LL |     with_real_default.unwrap_or_else(<HasDefaultAndDuplicate as Default>::default);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:63:24
   |
LL |     with_default_trait.unwrap_or_else(Default::default);
   |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:66:23
   |
LL |     with_default_type.unwrap_or_else(u64::default);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:69:23
   |
LL |     with_default_type.unwrap_or_else(Vec::new);
   |                       ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:72:18
   |
LL |     empty_string.unwrap_or_else(|| "".to_string());
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:76:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:79:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:82:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:85:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:88:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:91:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:94:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:97:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `unwrap_or_else` to construct default value
  --> $DIR/unwrap_or_else_default.rs:113:12
   |
LL |     option.unwrap_or_else(Vec::new).push(1);
   |            ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`

error: use of `or_insert_with` to construct default value
  --> $DIR/unwrap_or_else_default.rs:130:32
   |
LL |     let _ = inner_map.entry(0).or_insert_with(Default::default);
   |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`

error: aborting due to 16 previous errors