diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-11-10 01:50:24 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-10 01:50:24 +0100 |
| commit | 7096ec3e0046e235fe1435c4b41276d1001a8d5e (patch) | |
| tree | 062051d18248c278e14dee382a87b960a07faf2b /compiler/rustc_codegen_llvm/src/errors.rs | |
| parent | 9dc022dd80295519fd9d821deaf7a36631dbe311 (diff) | |
| parent | 545175ce87a9de4ea371f9d88bafd4d35984a533 (diff) | |
| download | rust-7096ec3e0046e235fe1435c4b41276d1001a8d5e.tar.gz rust-7096ec3e0046e235fe1435c4b41276d1001a8d5e.zip | |
Rollup merge of #117039 - scottmcm:clarify-get-unchecked, r=cuviper
Clarify UB in `get_unchecked(_mut)` Inspired by #116915, it was unclear to me what exactly "out-of-bounds index" means in `get_unchecked`. One could [potentially](https://rust.godbolt.org/z/hxM764orW) interpret it that `get_unchecked` is just another way to write `offset`, but I think `get_unchecked(len)` is supposed to be UB even though `.offet(len)` is well-defined (as is `.get_unchecked(..len)`), so write that more directly in the docs. **libs-api folks**: Can you confirm whether this is what you expect this to mean? And is the situation any different for `<*const [T]>::get_unchecked`?
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
