Support creating default Vec within a custom allocator#154990
Support creating default Vec within a custom allocator#154990Nokel81 wants to merge 1 commit intorust-lang:mainfrom
Conversation
|
rustbot has assigned @Mark-Simulacrum. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
@rustbot modify label: +I-libs-api-nominated |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
This breaks type inference unfortunately. |
Is that because of the lack of defaults within |
|
Type inference unfortunately ignores defaults entirely. This is also why for example |
From reading the docs I was thinking that it would be possible to mark |
|
I don't believe that is possible, but I did be happy to be proven wrong. |
This PR adds support for calling
Default::defaultfor someVec<T, A>as long as theAalso implementsDefault.