<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/codegen/slice-split-at.rs, branch try</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=try</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=try'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-03-30T16:45:04+00:00</updated>
<entry>
<title>slice: Remove some uses of unsafe in first/last chunk methods</title>
<updated>2025-03-30T16:45:04+00:00</updated>
<author>
<name>okaneco</name>
<email>47607823+okaneco@users.noreply.github.com</email>
</author>
<published>2025-03-29T18:47:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=59ca7679c7db634465b5f021060f143567824ac4'/>
<id>urn:sha1:59ca7679c7db634465b5f021060f143567824ac4</id>
<content type='text'>
Remove unsafe `split_at_unchecked` and `split_at_mut_unchecked`
in some slice `split_first_chunk`/`split_last_chunk` methods.
Replace those calls with the safe `split_at` and `split_at_checked` where
applicable.

Add codegen tests to check for no panics when calculating the last
chunk index using `checked_sub` and `split_at`
</content>
</entry>
</feed>
