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

Refactor various "type testing" traits to share code #20298

Closed
nikomatsakis opened this issue Dec 29, 2014 · 0 comments
Closed

Refactor various "type testing" traits to share code #20298

nikomatsakis opened this issue Dec 29, 2014 · 0 comments
Labels
A-type-system Area: Type system C-cleanup Category: PRs that clean code up or issues documenting cleanup.

Comments

@nikomatsakis
Copy link
Contributor

There are various traits (RegionEscape, HasProjectionTypes, ReferencesError) that are useful for checking properties on all the types/regions reachable through a value. Right now they each have their own separate impls for things like FnSig and Rc<T>. It'd be nice to use a setup like TypeFoldable instead to save code.

@kmcallister kmcallister added C-cleanup Category: PRs that clean code up or issues documenting cleanup. A-type-system Area: Type system labels Jan 16, 2015
bors added a commit that referenced this issue Jan 7, 2016
`TypeFoldable`s can currently be visited inefficiently with an identity folder that is run only for its side effects. This creates a more efficient visitor for `TypeFoldable`s and uses it to implement `RegionEscape` and `HasProjectionTypes`, fixing cleanup issue #20298.
This is a pure refactoring.
@bors bors closed this as completed in f9808ea Jan 7, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system C-cleanup Category: PRs that clean code up or issues documenting cleanup.
Projects
None yet
Development

No branches or pull requests

2 participants