-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.Category: This is a bug.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.
Description
I'm adding <A: AllocRef = Global>
to string types. Strings don't have a generic parameter, so the defaulted generic parameter is the first parameter:
pub struct String<#[unstable(feature = "allocator_api", issue = "32838")] A: AllocRef = Global> {}
However, the compiler complains, that this annotation is "useless":
error: This stability annotation is useless
--> library/alloc/src/string.rs:280:75
|
280 | pub struct String<#[unstable(feature = "allocator_api", issue = "32838")] A: AllocRef = Global> {
| ^
Was this simply not added by #77118 or is this a false positive in general?
mormahr
Metadata
Metadata
Assignees
Labels
A-allocatorsArea: Custom and system allocatorsArea: Custom and system allocatorsA-stabilityArea: `#[stable]`, `#[unstable]` etc.Area: `#[stable]`, `#[unstable]` etc.C-bugCategory: This is a bug.Category: This is a bug.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.