Skip to content

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

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

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

bors pushed a commit to rust-lang-ci/rust that referenced this issue Jan 28, 2025
…-lang#14047)

- The lint no longer triggers if one of the operands in the boolean
expression comes from a macro expansion.
- Parenthesis are now removed inside the generated block if they are no
longer necessary.
- Error markers have been added.

changelog: [`short_circuit_statement`]: better handling of macros and
better looking suggestions
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