Skip to content

Support for tuple contexts in attribute functions #16

@d0nutptr

Description

@d0nutptr

Contexts, in attribute functions, don't support tuple types since we need to replace lifetimes on any borrowed types.

We should relax this for tuple types by inspecting the elements in them and replacing the lifetimes as needed. This will allow us to handle cases like

#[attribute]
fn check_property(subject: &Subject, _: &(), (left, right): (Foo, &mut Bar) -> AttributeResult<Error> {
    // ...
}

which is not currently supported today

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions