Commit 7b2c1c2
Don't use
There is an effort to remove Rust's unconditional `[T; 0]: Default` impl
for `T: !Default`, see rust-lang/rust#145457.
foundations depends on this impl in its public API, so fixing this is a
breaking change.
However, after consideration we decided that we will break semver for
this change. We don't expect any users of foundations to depend directly
on `[T; 0]: Settings`. We also put a best-effort workaround in place for the
`#[derive(Settings)]` use case inside foundations.
Co-authored-by: Leo Blöcher <[email protected]>[!Default; 0]: Default impl (#150)1 parent c8974db commit 7b2c1c2
File tree
2 files changed
+39
-9
lines changed- foundations-macros/src
- foundations/src/settings
2 files changed
+39
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
238 | 238 | | |
239 | 239 | | |
240 | 240 | | |
241 | | - | |
242 | 241 | | |
243 | | - | |
244 | | - | |
245 | 242 | | |
246 | 243 | | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
247 | 254 | | |
248 | 255 | | |
249 | 256 | | |
| |||
286 | 293 | | |
287 | 294 | | |
288 | 295 | | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
289 | 320 | | |
290 | 321 | | |
291 | 322 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
| |||
119 | 118 | | |
120 | 119 | | |
121 | 120 | | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
126 | 125 | | |
127 | 126 | | |
128 | 127 | | |
| |||
0 commit comments