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

analyze: hypothetical lifetime params aren't added to union defs #995

Closed
spernsteiner opened this issue Jul 17, 2023 · 0 comments · Fixed by #1012
Closed

analyze: hypothetical lifetime params aren't added to union defs #995

spernsteiner opened this issue Jul 17, 2023 · 0 comments · Fixed by #1012
Assignees

Comments

@spernsteiner
Copy link
Collaborator

pub union Foo {
    x: usize,
    y: *mut u8,
}

struct UseFoo {
    foo: *mut Foo,
}

Rewritten output:

pub union Foo {
    x: usize,
    y: *mut u8,
}

struct UseFoo<'h1,'h0> {
    foo: &'h1 (Foo<'h0>),
}

A lifetime argument is added to the use of Foo in the type of the UseFoo::foo field, but no matching parameter declaration is added to the definition of union Foo.

This might be related to #994.

@aneksteind aneksteind self-assigned this Jul 19, 2023
@aneksteind aneksteind linked a pull request Aug 2, 2023 that will close this issue
aneksteind added a commit that referenced this issue Aug 2, 2023
Adds test showing #995 and #990 are fixed. I believe #1005 and #956
combined fixed these issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants