Repository navigation
Conversation
Contributor
Author
|
lookin for feedback for the above pr @alejandro-vaz |
alejandro-vaz
requested changes
Oct 9, 2026
| const SPILLED_SIZE: usize = 100; | ||
|
|
||
| trait Vector<T>: for<'a> From<&'a [T]> + Extend<T> + FromIterator<T> { | ||
| /// A trait defining common vector operations, implemented by vectors taking items from a slice of lifetime 'slice. |
Collaborator
There was a problem hiding this comment.
remove the doc comment, we really aren't reading them at all
we will figure out in rc what doc comments we really need
| // Bounded `usize` between `0..=CAP` | ||
| impl<'a, const CAP: usize> Arbitrary<'a> for Bounded<usize, CAP> { | ||
| impl<'data, const CAP: usize> Arbitrary<'data> for Bounded<usize, CAP> { | ||
| /// Generates an arbitrary bounded usize value using the unstructured fuzzing data of lifetime 'data. |
| where T: Arbitrary<'data> | ||
| { | ||
| fn arbitrary(u: &mut arbitrary::Unstructured<'a>) -> arbitrary::Result<Self> { | ||
| /// Generates an arbitrary bounded vector by consuming items from the unstructured data stream of lifetime 'data. |
| fn splice_reserve_panic() { | ||
| struct CountDrop<'a>(&'a Cell<usize>); | ||
| /// A helper struct that increments a counter when dropped, bound to the cell's lifetime 'cell. | ||
| struct CountDrop<'cell>(&'cell Cell<usize>); |
Collaborator
There was a problem hiding this comment.
change this to 'valid
| struct DropCounter<'cell>(&'cell Cell<i32>); | ||
|
|
||
| impl<'a> Drop for DropCounter<'a> { | ||
| impl<'cell> Drop for DropCounter<'cell> { |
| #[test] | ||
| fn splice_reserve_panic() { | ||
| struct CountDrop<'a>(&'a Cell<usize>); | ||
| /// A helper struct that increments a counter when dropped, bound to the cell's lifetime 'cell. |
| #[test] | ||
| fn into_iter_drop() { | ||
| struct DropCounter<'a>(&'a Cell<i32>); | ||
| /// A helper struct that increments a counter when dropped, bound to the cell's lifetime 'cell. |
Collaborator
|
also half of the checks fail |
Contributor
Author
|
Ooh sorry for that I will to solve this fully by tomorrow morning and make sure every checks passes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR addresses the allocator expansion task for
specialization.rs(#710).The following specialization traits have been updated to be generic over
Heap: Allocatorrather than being hardcoded to theGlobalallocator:SpecFromElem(for bothCloneandCopyitem implementations)SpecFromSlice(for bothCloneandCopyitem implementations)Note on
SpecFromIterator:As discussed in the main allocator tracking issue by
@bolshoytosterand@alejandro-vaz, expandingFromIteratorto custom allocators would awkwardly requireA: Allocator + Default. To stay consistent with standard library patterns,SpecFromIteratorwas intentionally left untouched and remains bound toGlobal.Related Issue
Fixes #710