dacquiri icon indicating copy to clipboard operation
dacquiri copied to clipboard

Support for tuple contexts in attribute functions

Open d0nutptr opened this issue 3 years ago • 0 comments

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

d0nutptr avatar Aug 29 '22 06:08 d0nutptr