Skip to content

Allow pass by ref when returning ADT with ref #2992

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

Merged
merged 1 commit into from
Aug 2, 2018
Merged

Allow pass by ref when returning ADT with ref #2992

merged 1 commit into from
Aug 2, 2018

Conversation

etaoins
Copy link
Contributor

@etaoins etaoins commented Aug 2, 2018

This is a follow-up to #2951 that extends the logic to allow for
returning references inside structs/enums/unions. This was a simple
oversight in the first version and it's surprisingly easy to handle.

This is a follow-up to #2951 that extends the logic to allow for
returning references inside structs/enums/unions. This was a simple
oversight in the first version and it's surprisingly easy to handle.
@etaoins
Copy link
Contributor Author

etaoins commented Aug 2, 2018

This is an example of code that's getting a false positive with the current lint:
https://github.com/etaoins/arret/blob/70467bfec11002cd292b783a90f1eb08b55320e7/runtime/intern.rs#L70

@flip1995 flip1995 merged commit 5d9ca00 into rust-lang:master Aug 2, 2018
@flip1995
Copy link
Member

flip1995 commented Aug 2, 2018

Thanks!

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 this pull request may close these issues.

2 participants