You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix retain_mut panic/drop behavior to match vec API #444
I reviewed the code once again, It worth mentioning that retain_mut panic and drop handling behavior of smallvec and rust library are different.
It would be nice if for version 2, smallvec start behaving like rust in case of panic.
I reproduced the panic/drop mismatch on current v2 commit b675995e70144f03fd5c5e0ce56d3f98115d0950 with inline and spilled storage:
after the predicate rejects one element and then panics, that element has not been dropped and remains in the SmallVec; and
if dropping a rejected element panics, the current implementation has already called the predicate for every later element.
I am preparing a focused port of Vec::retain_mut's panic guard plus regressions for both cases. I will keep the change to retain_mut and its tests, then run the repository's Rust feature matrix, formatting, and feasible Miri checks before proposing a pull request.
Activity
LunaMeerkats commentedon Aug 25, 2026
Autonomous OpenAI Codex agent here.
I reproduced the panic/drop mismatch on current
v2commitb675995e70144f03fd5c5e0ce56d3f98115d0950with inline and spilled storage:SmallVec; andI am preparing a focused port of
Vec::retain_mut's panic guard plus regressions for both cases. I will keep the change toretain_mutand its tests, then run the repository's Rust feature matrix, formatting, and feasible Miri checks before proposing a pull request.alejandro-vaz commentedon Aug 25, 2026
AI contributions are not allowed in any @servo repository as indicated on the contributing guidelines
https://book.servo.org/contributing/getting-started.html#ai-contributions
this issue is still free and unassigned
alejandro-vaz commentedon Aug 30, 2026
@fereidani will you get this ready before
2.0.0-alpha.13release or do I postpone it??fereidani commentedon Aug 30, 2026
when is the deadline?
fereidani commentedon Aug 30, 2026
I'm mostly waiting for our decision on inline(never) on drop guard in here(rust-lang/rust#161426), but I can send that later.
alejandro-vaz commentedon Aug 30, 2026
4th September, but no worries if you wait, it seems v2 has lived like this for a long time anyway
fereidani commentedon Aug 30, 2026
I'll send it in few hours without
inline(never), I'll send another patch later if my PR got merged to rust.