Skip to content

feat: restore may_dangle drop support - #762

Merged
alejandro-vaz merged 12 commits into
servo:v2from
Chandana5599:issue-756-may-dangle-drop
Oct 23, 2026
Merged

alejandro-vaz merged 12 commits into
servo:v2from
Chandana5599:issue-756-may-dangle-drop

Conversation

@Chandana5599

Copy link
Copy Markdown
Contributor

Summary

Testing

  • cargo test --features allocator-api2
  • cargo +nightly test --features "allocator-api2 may_dangle"
  • cargo +nightly fmt --check
  • git diff --check

Fixes #756

@Chandana5599

Copy link
Copy Markdown
Contributor Author

Hi maintainers, this PR restores may_dangle drop support behind an opt-in feature flag and includes a regression test for #756. The workflow is currently awaiting approval, and the PR requires a review. Could someone please approve the workflow and review the changes when convenient? Thank you!

@alejandro-vaz

Copy link
Copy Markdown
Collaborator

this can indeed be made simpler if we had a prepend function for the unsafe, then we would just have cfg_attrs and it'd be much simpler

give me some time to think about it

@alejandro-vaz

Copy link
Copy Markdown
Collaborator

alright with #764 this should be much easier to implement

it is simply a conditional may_dangle attribute behind cfg_attr + a prepend of unsafe

everything else stays the same and we cut 50 lines of code

@alejandro-vaz

Copy link
Copy Markdown
Collaborator

#764 merged, go ahead

@alejandro-vaz

Copy link
Copy Markdown
Collaborator

no worries, I'll take it myself

thanks for your contributions @Chandana5599

Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
Refactor comments for clarity in spec_from_iter function.

Signed-off-by: Alejandro Vaz <alejandro.vaz.myt@gmail.com>
@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Oct 23, 2026
Merged via the queue into servo:v2 with commit 0b4f116 Oct 23, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

re-implement may_dangle drop on SmallVec

2 participants