Closed
Description
Attributes on generic parameters (both types and lifetimes) were introduced in #34764. Extensive tests for them were added in the same PR.
// Example
fn f<#[my_type_attr] T, #[my_lifetime_attr] 'a>() {}
Notable build-in attribute accepted in this position is #[may_dangle]
(#34761) supplying information for drop checking.
However, custom attributes interpreted in custom ways by procedural macros can be used in this position as well.
Stabilization PR: #48851