]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/or_fun_call.stderr
bump version to 1.80.1+dfsg1-1~bpo12+pve1
[rustc.git] / src / tools / clippy / tests / ui / or_fun_call.stderr
CommitLineData
f20569fa 1error: use of `unwrap_or` followed by a function call
c620b35d 2 --> tests/ui/or_fun_call.rs:52:22
f20569fa
XL
3 |
4LL | with_constructor.unwrap_or(make());
add651ee 5 | ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(make)`
a2a8927a
XL
6 |
7 = note: `-D clippy::or-fun-call` implied by `-D warnings`
781aab86 8 = help: to override `-D warnings` add `#[allow(clippy::or_fun_call)]`
f20569fa 9
add651ee 10error: use of `unwrap_or` to construct default value
c620b35d 11 --> tests/ui/or_fun_call.rs:55:14
f20569fa
XL
12 |
13LL | with_new.unwrap_or(Vec::new());
add651ee
FG
14 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
15 |
16 = note: `-D clippy::unwrap-or-default` implied by `-D warnings`
781aab86 17 = help: to override `-D warnings` add `#[allow(clippy::unwrap_or_default)]`
f20569fa
XL
18
19error: use of `unwrap_or` followed by a function call
c620b35d 20 --> tests/ui/or_fun_call.rs:58:21
f20569fa
XL
21 |
22LL | with_const_args.unwrap_or(Vec::with_capacity(12));
add651ee 23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| Vec::with_capacity(12))`
f20569fa
XL
24
25error: use of `unwrap_or` followed by a function call
c620b35d 26 --> tests/ui/or_fun_call.rs:61:14
f20569fa
XL
27 |
28LL | with_err.unwrap_or(make());
add651ee 29 | ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| make())`
f20569fa
XL
30
31error: use of `unwrap_or` followed by a function call
c620b35d 32 --> tests/ui/or_fun_call.rs:64:19
f20569fa
XL
33 |
34LL | with_err_args.unwrap_or(Vec::with_capacity(12));
add651ee 35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|_| Vec::with_capacity(12))`
f20569fa 36
add651ee 37error: use of `unwrap_or` to construct default value
c620b35d 38 --> tests/ui/or_fun_call.rs:67:24
f20569fa
XL
39 |
40LL | with_default_trait.unwrap_or(Default::default());
add651ee 41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
f20569fa 42
add651ee 43error: use of `unwrap_or` to construct default value
c620b35d 44 --> tests/ui/or_fun_call.rs:70:23
f20569fa
XL
45 |
46LL | with_default_type.unwrap_or(u64::default());
add651ee 47 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
f20569fa 48
94222f64 49error: use of `unwrap_or` followed by a function call
c620b35d 50 --> tests/ui/or_fun_call.rs:73:18
94222f64
XL
51 |
52LL | self_default.unwrap_or(<FakeDefault>::default());
add651ee 53 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(<FakeDefault>::default)`
94222f64 54
add651ee 55error: use of `unwrap_or` to construct default value
c620b35d 56 --> tests/ui/or_fun_call.rs:76:18
94222f64
XL
57 |
58LL | real_default.unwrap_or(<FakeDefault as Default>::default());
add651ee 59 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
94222f64 60
add651ee 61error: use of `unwrap_or` to construct default value
c620b35d 62 --> tests/ui/or_fun_call.rs:79:14
f20569fa
XL
63 |
64LL | with_vec.unwrap_or(vec![]);
add651ee 65 | ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
f20569fa
XL
66
67error: use of `unwrap_or` followed by a function call
c620b35d 68 --> tests/ui/or_fun_call.rs:82:21
f20569fa
XL
69 |
70LL | without_default.unwrap_or(Foo::new());
add651ee 71 | ^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(Foo::new)`
f20569fa 72
add651ee 73error: use of `or_insert` to construct default value
c620b35d 74 --> tests/ui/or_fun_call.rs:85:19
f2b60f7d
FG
75 |
76LL | map.entry(42).or_insert(String::new());
add651ee 77 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
f2b60f7d 78
add651ee 79error: use of `or_insert` to construct default value
c620b35d 80 --> tests/ui/or_fun_call.rs:88:23
f2b60f7d
FG
81 |
82LL | map_vec.entry(42).or_insert(vec![]);
add651ee 83 | ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
f2b60f7d 84
add651ee 85error: use of `or_insert` to construct default value
c620b35d 86 --> tests/ui/or_fun_call.rs:91:21
f2b60f7d
FG
87 |
88LL | btree.entry(42).or_insert(String::new());
add651ee 89 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
f2b60f7d 90
add651ee 91error: use of `or_insert` to construct default value
c620b35d 92 --> tests/ui/or_fun_call.rs:94:25
f2b60f7d
FG
93 |
94LL | btree_vec.entry(42).or_insert(vec![]);
add651ee 95 | ^^^^^^^^^^^^^^^^^ help: try: `or_default()`
f2b60f7d 96
add651ee 97error: use of `unwrap_or` to construct default value
c620b35d 98 --> tests/ui/or_fun_call.rs:97:21
f20569fa 99 |
f2b60f7d 100LL | let _ = stringy.unwrap_or(String::new());
add651ee 101 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
f20569fa
XL
102
103error: use of `unwrap_or` followed by a function call
c620b35d 104 --> tests/ui/or_fun_call.rs:105:21
f20569fa
XL
105 |
106LL | let _ = Some(1).unwrap_or(map[&1]);
add651ee 107 | ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| map[&1])`
f20569fa
XL
108
109error: use of `unwrap_or` followed by a function call
c620b35d 110 --> tests/ui/or_fun_call.rs:107:21
f20569fa
XL
111 |
112LL | let _ = Some(1).unwrap_or(map[&1]);
add651ee 113 | ^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| map[&1])`
f20569fa
XL
114
115error: use of `or` followed by a function call
c620b35d 116 --> tests/ui/or_fun_call.rs:131:35
f20569fa
XL
117 |
118LL | let _ = Some("a".to_string()).or(Some("b".to_string()));
add651ee 119 | ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_else(|| Some("b".to_string()))`
f20569fa 120
cdc7bbd5 121error: use of `unwrap_or` followed by a function call
c620b35d 122 --> tests/ui/or_fun_call.rs:170:14
cdc7bbd5 123 |
a2a8927a 124LL | None.unwrap_or(ptr_to_ref(s));
add651ee 125 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| ptr_to_ref(s))`
cdc7bbd5
XL
126
127error: use of `unwrap_or` followed by a function call
c620b35d 128 --> tests/ui/or_fun_call.rs:176:14
cdc7bbd5 129 |
a2a8927a 130LL | None.unwrap_or(unsafe { ptr_to_ref(s) });
add651ee 131 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
cdc7bbd5
XL
132
133error: use of `unwrap_or` followed by a function call
c620b35d 134 --> tests/ui/or_fun_call.rs:178:14
cdc7bbd5 135 |
a2a8927a 136LL | None.unwrap_or( unsafe { ptr_to_ref(s) } );
add651ee 137 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_else(|| unsafe { ptr_to_ref(s) })`
cdc7bbd5 138
add651ee 139error: use of `map_or` followed by a function call
c620b35d 140 --> tests/ui/or_fun_call.rs:253:25
5099ac24 141 |
add651ee
FG
142LL | let _ = Some(4).map_or(g(), |v| v);
143 | ^^^^^^^^^^^^^^^^^^ help: try: `map_or_else(g, |v| v)`
5099ac24 144
add651ee 145error: use of `map_or` followed by a function call
c620b35d 146 --> tests/ui/or_fun_call.rs:254:25
5099ac24 147 |
add651ee
FG
148LL | let _ = Some(4).map_or(g(), f);
149 | ^^^^^^^^^^^^^^ help: try: `map_or_else(g, f)`
5099ac24 150
add651ee 151error: use of `unwrap_or_else` to construct default value
c620b35d 152 --> tests/ui/or_fun_call.rs:285:18
5099ac24 153 |
add651ee
FG
154LL | with_new.unwrap_or_else(Vec::new);
155 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
5099ac24 156
add651ee 157error: use of `unwrap_or_else` to construct default value
c620b35d 158 --> tests/ui/or_fun_call.rs:288:28
5099ac24 159 |
add651ee
FG
160LL | with_default_trait.unwrap_or_else(Default::default);
161 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
5099ac24 162
add651ee 163error: use of `unwrap_or_else` to construct default value
c620b35d 164 --> tests/ui/or_fun_call.rs:291:27
487cf647 165 |
add651ee
FG
166LL | with_default_type.unwrap_or_else(u64::default);
167 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
487cf647 168
add651ee 169error: use of `unwrap_or_else` to construct default value
c620b35d 170 --> tests/ui/or_fun_call.rs:294:22
487cf647 171 |
add651ee
FG
172LL | real_default.unwrap_or_else(<FakeDefault as Default>::default);
173 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
174
175error: use of `or_insert_with` to construct default value
c620b35d 176 --> tests/ui/or_fun_call.rs:297:23
add651ee
FG
177 |
178LL | map.entry(42).or_insert_with(String::new);
179 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
180
181error: use of `or_insert_with` to construct default value
c620b35d 182 --> tests/ui/or_fun_call.rs:300:25
add651ee
FG
183 |
184LL | btree.entry(42).or_insert_with(String::new);
185 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
186
187error: use of `unwrap_or_else` to construct default value
c620b35d 188 --> tests/ui/or_fun_call.rs:303:25
add651ee
FG
189 |
190LL | let _ = stringy.unwrap_or_else(String::new);
191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
487cf647 192
add651ee 193error: aborting due to 31 previous errors
f20569fa 194