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

Newtype enum dereferences #7552

Closed
sanxiyn opened this issue Jul 2, 2013 · 2 comments
Closed

Newtype enum dereferences #7552

sanxiyn opened this issue Jul 2, 2013 · 2 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)

Comments

@sanxiyn
Copy link
Member

sanxiyn commented Jul 2, 2013

I noticed this while trying to remove codes related to newtype enums. Newtype enum syntax is gone, but rustc still relies on autodereference behavior.

Most notably, syntax::visit::vt<E> is an enum but codes access fields such as visit_expr. Since it is a newtype enum (one variant and one argument) it currently works, but I think the idea is to get rid of newtype enum dereferences?

My attempt to replace it with a newtype struct met ICEs and was unsuccessful.

@thestinger
Copy link
Contributor

This is still an issue, but it's not clear if this is what we want to do. Tagging this as an RFC.

@brson
Copy link
Contributor

brson commented Jan 5, 2014

Fixed.

@brson brson closed this as completed Jan 5, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR)
Projects
None yet
Development

No branches or pull requests

3 participants