Skip to content

Tracking issue for attributes on generic parameters (generic_param_attrs) #48848

Closed
@petrochenkov

Description

@petrochenkov

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCT-langRelevant to the language team, which will review and decide on the PR/issue.final-comment-periodIn the final comment period and will be merged soon unless new substantive objections are raised.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions