-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Allow Trait inheritance with cycles on associated types #79209
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
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
24dcf6f
Allow to use super trait bounds in where clauses
spastorino 2ca4964
Allow to self reference associated types in where clauses
spastorino 4406805
Update tests
spastorino 4a97c52
Add test to check that we do not get a cycle due to resolving `Self::…
nikomatsakis 5b6f206
Fix super_traits_of to consider where bounds
spastorino 3c8cf6d
Avoid ICEing when associated type bound trait is missing
spastorino a6d2235
Add test for a still ambiguous scenario
spastorino f76d6e0
Add description on test
spastorino aa1cafd
Add `` to variable name in docs
spastorino 30e933c
Extract trait_may_define_assoc_type helper function
spastorino 6631215
Remove unneeded logic
spastorino b60a214
super_traits_of is now a query
spastorino c0007a2
Extract function trait_may_define_assoc_type
spastorino dd267fe
compute_bounds takes &[GenericBound]
spastorino 6ab8fe2
Bless tests
spastorino b916ac6
adjust super_predicates_that_define_assoc_type query description
spastorino af38d71
Add super_traits_of docs
spastorino a175f36
Document compute_bounds_that_match_assoc_type
spastorino 9e0538b
Document elaborate_trait_refs_that_define_assoc_type
spastorino 28446ef
Inline elaborate_trait_refs_that_define_assoc_type into transitive_bo…
spastorino ac1845a
Fix super_predicates_that_define_assoc_type API doc
spastorino 1895e52
Fix super_traits_of API doc
spastorino 67ea9b2
Make super_traits_of return Lrc for cheaper clone
spastorino b02a905
Add test to check that we handle predicates that can define assoc typ…
spastorino a6136d8
Simplify super_traits_of
spastorino 35bf466
Remove super_traits_of query, just leave a helper function
spastorino 504d27c
Make super_traits_of return an iterator
spastorino ada7c1f
Return FxIndexSet instead of FxHashSet to avoid order errors on diffe…
spastorino File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.