Skip to content

Add proptest Arbitrary trait implementation - #757

Merged
alejandro-vaz merged 6 commits into
servo:v2from
GauravPawar101:proptest-arbitrary
Oct 9, 2026
Merged

alejandro-vaz merged 6 commits into
servo:v2from
GauravPawar101:proptest-arbitrary

Conversation

@GauravPawar101

@GauravPawar101 GauravPawar101 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Implements proptest::arbitrary::Arbitrary for SmallVec<Item, INLINE, Global> behind a new proptest feature flag.

Changes

  • Cargo.toml: Added proptest feature (requires std)
  • src/lib.rs: Added Arbitrary impl using proptest::collection::vec
  • tests/proptest.rs: Three property tests

Notes

  • Feature requires std (as dev-time only)
  • Incompatible with allocator-api2 — proptest generates std::vec::Vec while allocator-api2 uses allocator_api2::vec::Vec; the impl is gated

Closes #755

Comment thread src/lib.rs
Comment thread tests/proptest.rs Outdated
Comment thread Cargo.toml Outdated
Comment thread Cargo.toml Outdated
Comment thread Cargo.toml Outdated
Comment thread src/lib.rs Outdated
@GauravPawar101

Copy link
Copy Markdown
Contributor Author

accidentally pushed ran rust fmt and it reformatted

@alejandro-vaz alejandro-vaz left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GauravPawar101

Copy link
Copy Markdown
Contributor Author

Welcome

@alejandro-vaz
alejandro-vaz added this pull request to the merge queue Oct 9, 2026
Merged via the queue into servo:v2 with commit e21e1e5 Oct 9, 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.

implement proptest::Arbitrary for SmallVec

2 participants