Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Closed
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f4b7735
Rename hir const arg walking functions
BoxyUwU Jun 17, 2025
c9264a1
Don't double visit `HirId`s of inferred const/types
BoxyUwU Jun 17, 2025
2411fba
Link to dev-guide docs
BoxyUwU Jun 18, 2025
fa5895e
Reviews
BoxyUwU Jun 25, 2025
19c6815
Multiple bounds checking elision failures
lucarlig Aug 1, 2025
ae2f8d9
Remove the omit_gdb_pretty_printer_section attribute
bjorn3 Jul 31, 2025
066023e
feat: implement `hash_map!` macro
stifskere Aug 1, 2025
2f60cef
`Interner` arg to `EarlyBinder` does not affect auto traits
Veykril Aug 2, 2025
870b58f
Update E0562 to account for the new impl trait positions
Noratrieb Aug 2, 2025
40f587a
Flatten `hash_owner_nodes` with an early-return
Zalathar Aug 2, 2025
d3e597a
Return a struct with named fields from `hash_owner_nodes`
Zalathar Aug 2, 2025
f87e829
update flags for consistency
Kivooeo Aug 2, 2025
8ca7986
update links
Kivooeo Aug 2, 2025
2ddf0ca
Change `ProcRes::print_info` to `format_info`
Zalathar Aug 2, 2025
d1d44d4
Consolidate all `ProcRes` unwinds into one code path
Zalathar Aug 2, 2025
1063b0f
Change `TestCx::error` to `error_prefix`, which returns a string
Zalathar Aug 2, 2025
c539890
forbid tail calling intrinsics
WaffleLapkin Aug 3, 2025
fcd8b67
Rollup merge of #142678 - BoxyUwU:gai_cleanup, r=nnethercote
samueltardieu Aug 3, 2025
8f8df8f
Rollup merge of #144070 - stifskere:feat/macros/hash_map, r=Noratrieb
samueltardieu Aug 3, 2025
78fe575
Rollup merge of #144738 - bjorn3:remove_omit_gdb_pretty_printer_secti…
samueltardieu Aug 3, 2025
b6eb88b
Rollup merge of #144790 - lucarlig:pr-bounds-elision, r=compiler-errors
samueltardieu Aug 3, 2025
0518b84
Rollup merge of #144805 - Zalathar:proc-res, r=jieyouxu
samueltardieu Aug 3, 2025
79f00a8
Rollup merge of #144808 - Veykril:push-uttkuyswqnzt, r=compiler-errors
samueltardieu Aug 3, 2025
fef27ca
Rollup merge of #144816 - Noratrieb:e0562-impl-trait, r=WaffleLapkin
samueltardieu Aug 3, 2025
1cb1560
Rollup merge of #144822 - Zalathar:hash-owner-nodes, r=compiler-errors
samueltardieu Aug 3, 2025
aad10df
Rollup merge of #144824 - Kivooeo:update-links, r=Noratrieb
samueltardieu Aug 3, 2025
4881b03
Rollup merge of #144829 - Kivooeo:strip-flag, r=WaffleLapkin
samueltardieu Aug 3, 2025
ce2438c
Rollup merge of #144851 - WaffleLapkin:instrinsic-deny, r=compiler-er…
samueltardieu Aug 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Multiple bounds checking elision failures
  • Loading branch information
lucarlig committed Aug 1, 2025
commit 19c6815a212d86c389ef54c3ddb02697ffc45f93
19 changes: 19 additions & 0 deletions tests/codegen-llvm/bounds-check-elision-slice-min.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
//! Regression test for #<https://github.com/rust-lang/rust/issues/120433>:
//! Multiple bounds checking elision failures
//! (ensures bounds checks are properly elided,
//! with no calls to panic_bounds_check in the LLVM IR).

//@ compile-flags: -C opt-level=3

#![crate_type = "lib"]

// CHECK-LABEL: @foo
// CHECK-NOT: panic_bounds_check
#[no_mangle]
pub fn foo(buf: &[u8], alloced_size: usize) -> &[u8] {
if alloced_size.checked_add(1).map(|total| buf.len() < total).unwrap_or(true) {
return &[];
}
let size = buf[0];
&buf[1..1 + usize::min(alloced_size, usize::from(size))]
}
Loading