-
-
Notifications
You must be signed in to change notification settings - Fork 15k
Vec's const_make_global method erroring when Vec is empty #153158
Copy link
Copy link
Closed
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-bugCategory: This is a bug.Category: This is a bug.F-const_heap`#[feature(const_heap)]``#[feature(const_heap)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-collectionsArea: `std::collections`Area: `std::collections`C-bugCategory: This is a bug.Category: This is a bug.F-const_heap`#[feature(const_heap)]``#[feature(const_heap)]`T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
I tried this code:
I expected
const_make_global()to just return an empty'staticsliceInstead, it gave me this error:
But this code:
works just fine
Meta
rustc --version --verbose:I am assuming it was because the
Vecwas empty