Skip to content

Remove newtype struct auto-dereferencing method resolution #6246

Closed
@brson

Description

@brson

This topic is sort of buried in #3534. Consider removing the auto-deref behavior on newtype structs. Specifically, auto-dereferencing method resolution. I have seen unexpected method checking errors because of it on multiple occasions, but have not seen it used effectively.

The use case I know for this feature is smart pointers, but as a solution for smart pointer dereferencing it is not useful because it allows for no additional state besides the contained value.

Simplifying method resolution is good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions