about summary refs log tree commit diff
path: root/compiler/rustc_ty_utils/src/instance.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-06-16 03:22:02 +0000
committerbors <bors@rust-lang.org>2024-06-16 03:22:02 +0000
commitcd0c944b0750db887291bc25f20a05f8f31a8195 (patch)
tree3a04b7ef435701180685d7c214ca8f3d5795f2cf /compiler/rustc_ty_utils/src/instance.rs
parentbc3618f31ea3866e6abea6995ec3979d12ffc65d (diff)
parent33c4817d98850ce90dd18a7e80bd04ca05dafaee (diff)
downloadrust-cd0c944b0750db887291bc25f20a05f8f31a8195.tar.gz
rust-cd0c944b0750db887291bc25f20a05f8f31a8195.zip
Auto merge of #126299 - scottmcm:tune-sliceindex-ubchecks, r=saethlin
Remove superfluous UbChecks from `SliceIndex` methods

The current implementation calls the unsafe ones from the safe ones, but that means they end up emitting UbChecks that are impossible to hit, since we just checked those things.

This PR adds some new module-local helpers for the code shared between them, so the safe methods can be small enough to inline by avoiding those extra checks, while the unsafe methods still help catch length mistakes.

r? `@saethlin`
Diffstat (limited to 'compiler/rustc_ty_utils/src/instance.rs')
0 files changed, 0 insertions, 0 deletions