Skip to content

Commit 5d9b04f

Browse files
committed
add clarifying doc comment
1 parent 19861ed commit 5d9b04f

File tree

1 file changed

+2
-0
lines changed
  • src/tools/miri/tests/pass

1 file changed

+2
-0
lines changed

src/tools/miri/tests/pass/vec.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,8 @@ fn miri_issue_2759() {
169169
input.replace_range(0..0, "0");
170170
}
171171

172+
/// This was skirting the edge of UB, let's make sure it remains on the sound side.
173+
/// Context: <https://github.com/rust-lang/rust/pull/141032>.
172174
fn extract_if() {
173175
let mut v = vec![Box::new(0u64), Box::new(1u64)];
174176
for item in v.extract_if(.., |x| **x == 0) {

0 commit comments

Comments
 (0)