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

#[deriving(Deref)] for newtype structs #14047

Closed
lilyball opened this issue May 8, 2014 · 1 comment
Closed

#[deriving(Deref)] for newtype structs #14047

lilyball opened this issue May 8, 2014 · 1 comment

Comments

@lilyball
Copy link
Contributor

lilyball commented May 8, 2014

The deriving machinery should support #[deriving(Deref)] on newtype structs. Originally newtype structs could always be deref'd to return the wrapped type, and it's useful to be able to opt back into that behavior on a per-struct basis.

Deriving Deref should also derive DerefMut.

@steveklabnik
Copy link
Member

Closing in favor of rust-lang/rfcs#261

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

No branches or pull requests

2 participants