diff options
| author | bors <bors@rust-lang.org> | 2020-09-18 05:47:00 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-09-18 05:47:00 +0000 |
| commit | a0925fba747b4cf910592540aa1f817778dc315c (patch) | |
| tree | 29639663a51d9a1e6b2f3a1b62f8348ca361477a /compiler/rustc_errors/src/snippet.rs | |
| parent | f3c923a13a458c35ee26b3513533fce8a15c9c05 (diff) | |
| parent | 378b64392f5bdbcffbdc6506b00b6bfcfcd46d73 (diff) | |
| download | rust-a0925fba747b4cf910592540aa1f817778dc315c.tar.gz rust-a0925fba747b4cf910592540aa1f817778dc315c.zip | |
Auto merge of #76790 - ssomers:btree_slice_slasher_returns, r=Mark-Simulacrum
BTreeMap: avoid slices even more Epilogue to #73971: it seems the compiler is unable to realize that creating a slice and `get_unchecked`-ing one element is a simple fetch. So try to spell it out for the only remaining but often invoked case. Also, the previous code doesn't seem fair game to me, using `get_unchecked` to reach beyond the end of a slice. Although the local function `slice_insert` also does that. r? `@Mark-Simulacrum`
Diffstat (limited to 'compiler/rustc_errors/src/snippet.rs')
0 files changed, 0 insertions, 0 deletions
