diff options
| author | bors <bors@rust-lang.org> | 2023-02-16 17:25:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-02-16 17:25:25 +0000 |
| commit | eac0bd9da39154f53d3251b19e6d5690332a5529 (patch) | |
| tree | 19ea914b8826aed21163aed2943f9fb5a53a8027 /tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff | |
| parent | be7477381ba0327c0972c850e2428ee31e2cc7b8 (diff) | |
| parent | 7e53e27dfdb5ce4cda44912fcc6c288c34ac7d91 (diff) | |
| download | rust-eac0bd9da39154f53d3251b19e6d5690332a5529.tar.gz rust-eac0bd9da39154f53d3251b19e6d5690332a5529.zip | |
Auto merge of #10361 - nindalf:nth_bytes_copy, r=llogiq
Stop bytes_nth from suggesting code that does not compile Fixes #10151 As discussed in the issue, this PR changes the lint in 2 ways 1. Replace `bytes().nth(n).unwrap()` with `as_bytes()[n]` 2. Replace other `bytes().nth(n)` with `as_bytes().get(n).copied()` --- changelog: Stop bytes_nth from suggesting code that does not compile in some cases
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions
