Commit c0f86f5
committed
Auto merge of #41602 - hsivonen:explainnonnull, r=steveklabnik
Explain why zero-length slices require a non-null pointer
In reference to [a thread on Discourse](https://users.rust-lang.org/t/why-does-std-slice-from-raw-parts-require-a-non-null-pointer-for-zero-length-slices/10534), explain why `from_raw_parts` requires a non-null pointer for zero-length slices.
r? @steveklabnik2 files changed
+10
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2354 | 2354 | | |
2355 | 2355 | | |
2356 | 2356 | | |
2357 | | - | |
| 2357 | + | |
| 2358 | + | |
| 2359 | + | |
| 2360 | + | |
2358 | 2361 | | |
2359 | 2362 | | |
2360 | 2363 | | |
| |||
2387 | 2390 | | |
2388 | 2391 | | |
2389 | 2392 | | |
2390 | | - | |
| 2393 | + | |
| 2394 | + | |
2391 | 2395 | | |
2392 | 2396 | | |
2393 | 2397 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
323 | 326 | | |
324 | 327 | | |
325 | 328 | | |
| |||
0 commit comments