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

Cleanup and add const modifiers to equlity interface #572

Merged
merged 3 commits into from Jul 16, 2021
Merged

Conversation

philberty
Copy link
Member

As part of an effort to cleanup some of the interfaces within the TyTy module
this PR adds a const visitor for accessing each type and updates the can_eq
interface to also be const as it should not require mutability.

These changes fell out of a branch for optional trait items support.

This change keeps an enum for the candidate type and the parent impl block
this probed candidate originates from.
If we keep track of the impl blocks within the crate's we can use this
as another way to stream line looking up of specific HIR::Items. This
will be used to find possible bounds for a receiver in a path probe.
When we are trying to check for possible equivalence such as a simple
generic function against a substituted one we do not and should not require
mutability. This enforces some code tidy up by providing a const visitor
pattern for types.
@philberty philberty added this to the Data Structures 3 - Traits milestone Jul 16, 2021
@philberty philberty self-assigned this Jul 16, 2021
@philberty philberty added this to In progress in Data Structures 3 - Traits via automation Jul 16, 2021
@philberty
Copy link
Member Author

bors r+

@bors
Copy link
Contributor

bors bot commented Jul 16, 2021

Build succeeded:

@bors bors bot merged commit eea221e into master Jul 16, 2021
Data Structures 3 - Traits automation moved this from In progress to Done Jul 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant