resyncgg / dacquiri

A strong, compile-time enforced authorization framework for rust applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for tuple contexts in attribute functions

d0nutptr opened this issue · comments

commented

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