{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreicec4p2njfnkymg7enz5ec7a75py765k2pfkkjibwjdjnjfwyr5lu",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mi4xxldgv3f2"
  },
  "path": "/t/pre-rfc-allow-attributes-to-be-applied-to-generic-arguments/24111#post_3",
  "publishedAt": "2026-03-27T01:40:59.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "eebop:\n\n> If the allocator_api was enabled, you could automatically support it in your struct.\n>\n>\n>     struct MyCollection<#[cfg(feature = \"allocator_api\")] A: Allocator>{\n>         // ..\n>         alloc: A\n>     }\n>\n\nThis is, I think, a bad motivating example because that's a non-additive feature when you're changing the generics.\n\n(Compare private fields where adding or removing the field doesn't break the caller.)\n\nMight as well just leave the type there all the time, and either ignore it or only support one particular type if the feature is off.",
  "title": "[Pre-RFC] Allow attributes to be applied to generic arguments"
}