Proposed small documentation/test contribution for Vector::new, follow_cast_ref, and VectorIter::from_slice.
The patch adds three compile-fail examples and three corresponding valid-use examples. The APIs already require unsafe. This is preventive coverage of existing contracts, not a newly discovered vulnerability or a runtime fix. No implementation, signature or dependency changes.
Patch: https://github.com/mhusnain8721/data-science/blob/55c1f819f6898f8ba3979e5db9f51271e96fa1f6/contributions/flatbuffers/flatbuffers-rust-unsafe-contract-doctests.patch
Patch SHA-256: 2a8c6f157225de6d5a58eb9762de8e4db99366cdfeb915e168a518da7a8a193e
Validation against upstream commit 5761d6e67af841d15ee21bc1ce9a78ffa9cf939e:
- Six new doctests pass with default features and with
--no-default-features; one pre-existing ignored example in each run.
- Independent checks confirm the three negatives fail specifically with E0133 and the three positives compile and execute in each configuration.
- Patch applicability and whitespace checks passed.
Executed CI: https://github.com/mhusnain8721/data-science/actions/runs/34373711135
The full multi-language suite and Rust minimum-supported-version matrix were not run. Prepared with AI assistance; contributor-agreement status is unconfirmed. The available integration cannot create a fork, so no pull request currently exists.
Would this focused coverage be welcome as a pull request?
Proposed small documentation/test contribution for
Vector::new,follow_cast_ref, andVectorIter::from_slice.The patch adds three compile-fail examples and three corresponding valid-use examples. The APIs already require
unsafe. This is preventive coverage of existing contracts, not a newly discovered vulnerability or a runtime fix. No implementation, signature or dependency changes.Patch: https://github.com/mhusnain8721/data-science/blob/55c1f819f6898f8ba3979e5db9f51271e96fa1f6/contributions/flatbuffers/flatbuffers-rust-unsafe-contract-doctests.patch
Patch SHA-256:
2a8c6f157225de6d5a58eb9762de8e4db99366cdfeb915e168a518da7a8a193eValidation against upstream commit
5761d6e67af841d15ee21bc1ce9a78ffa9cf939e:--no-default-features; one pre-existing ignored example in each run.Executed CI: https://github.com/mhusnain8721/data-science/actions/runs/34373711135
The full multi-language suite and Rust minimum-supported-version matrix were not run. Prepared with AI assistance; contributor-agreement status is unconfirmed. The available integration cannot create a fork, so no pull request currently exists.
Would this focused coverage be welcome as a pull request?