Commit 699eb95
committed
Auto merge of #50039 - ExpHP:quick-50002, r=alexcrichton
smaller PR just to fix #50002
I pulled this out of #50010 to make it easier to backport to beta if necessary, considering that inclusive range syntax is stabilizing soon (?).
It fixes a bug in `<str>::index_mut` with `(..=end)` ranges (#50002), which prior to this fix was not only unusable but also UB in the cases where it "worked" (it gave improperly truncated UTF-8).
(not that I can imagine why anybody would *use* `<str>::index_mut`... but I'm not here to judge)2 files changed
+32
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
401 | 401 | | |
402 | 402 | | |
403 | 403 | | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
404 | 434 | | |
405 | 435 | | |
406 | 436 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2100 | 2100 | | |
2101 | 2101 | | |
2102 | 2102 | | |
2103 | | - | |
2104 | | - | |
| 2103 | + | |
2105 | 2104 | | |
2106 | 2105 | | |
2107 | 2106 | | |
2108 | 2107 | | |
2109 | 2108 | | |
2110 | | - | |
2111 | | - | |
2112 | | - | |
2113 | | - | |
2114 | | - | |
| 2109 | + | |
2115 | 2110 | | |
2116 | 2111 | | |
2117 | 2112 | | |
| |||
0 commit comments