News for hackers. Stuff that matters.
Re:Rust, Lifetimes, and Collections by gliptic on Wednesday November 19, 2014 @01:37PM (#8631740)
You don't have to turn off subscript checking for simple loop iteration. As the article says, you're supposed to use .iter_mut() for this purpose where the unsafe code is isolated to library code.

The passage you quoted is about splitting a slice in two, not loop iteration. Bounds-check elimination can't solve this problem, and once again it's about unsafe code encapsulated in libraries. The function split_at_mut is perfectly safe to use in safe code.

There are no comments on this comment yet.