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

Require assoc types to outlive struct they are referenced from #22407

Conversation

nikomatsakis
Copy link
Contributor

This PR includes a bunch of refactoring that was part of an experimental branch implementing [implied bounds]. That particular idea isn't ready to go yet, but the refactoring proved useful for fixing #22246. The implied bounds branch also exposed #22110 so a simple fix for that is included here. I still think some more refactoring would be a good idea here -- in particular I think most of the code in wf.rs is kind of duplicating the logic in implicator and should go, but I decided to post this PR and call it a day before diving into that. I'll write a bit more details about the solutions I adopted in the various bugs.

r? @pnkfelix (for now, anyway)
cc @aturon

@nikomatsakis
Copy link
Contributor Author

Hmm, already thought of one shortcoming. For #22246, I'm not considering supertraits, which I certainly should be doing.

@nikomatsakis
Copy link
Contributor Author

Actually, I thought of another shortcoming around HRTB. I'm going to close this PR and re-work it a bit. Nothing like opening a PR to make your mind reveal the problems.

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