-
Notifications
You must be signed in to change notification settings - Fork 73
Attribute handling reworks #796
Copy link
Copy link
Closed
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted
Description
Activity
Metadata
Metadata
Assignees
Labels
T-compilerAdd this label so rfcbot knows to poll the compiler teamAdd this label so rfcbot knows to poll the compiler teammajor-changeA proposal to make a major change to rustcA proposal to make a major change to rustcmajor-change-acceptedA major change proposal that was acceptedA major change proposal that was accepted
Proposal
Attributes are only partially lowered, and parsed in no less than 60 different places all around the compiler. I filed an issue earlier on rust-lang/rust but on the recomendation of @BoxyUwU and @WaffleLapkin I'm filing this as an MCP. Usually a proposal goes here, but I think my original issue already rougly covers that. I will, below, discuss steps in which we can implement this change.
ast::Attributeandhir::AttributeHir attributes rust#131808hir::Attributewith one variant that represents "old style" attributes and contains the current structure, and where more variants can be added that are pre-parsedrustc_attrto be the place where attributes are parsed and checked, making this a central place for this.Mentors or Reviewers
I'll certainly talk a lot to @WaffleLapkin and @m-ou-se about this as I work with them daily. Apart from that, maybe more people are interested? Possibly @petrochenkov should second this too.
Process
The main points of the Major Change Process are as follows:
@rustbot second.-C flag, then full team check-off is required.@rfcbot fcp mergeon either the MCP or the PR.You can read more about Major Change Proposals on forge.
Comments
There was already a zulip stream for this: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Attribute.20handling.20reworks
Let me also ping @jieyouxu and @bjorn3 here as they commented on the orginal proposal.