Skip to content

feat: restore may_dangle drop support - #762

Open
Chandana5599 wants to merge 1 commit into
servo:v2from
Chandana5599:issue-756-may-dangle-drop
Open

Chandana5599 wants to merge 1 commit into
servo:v2from
Chandana5599:issue-756-may-dangle-drop

Conversation

@Chandana5599

Copy link
Copy Markdown

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
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

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