Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for tuple contexts in attribute functions #16

Open
d0nutptr opened this issue Aug 29, 2022 · 0 comments
Open

Support for tuple contexts in attribute functions #16

d0nutptr opened this issue Aug 29, 2022 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@d0nutptr
Copy link
Collaborator

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 d0nutptr added the enhancement New feature or request label Aug 29, 2022
@d0nutptr d0nutptr self-assigned this Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant