Skip to content

Derived Hash impl is duck-typed #21160

Closed
@apasel422

Description

@apasel422

The following compiles successfully with rustc 1.0.0-nightly (170c4399e 2015-01-14 00:41:55 +0000):

struct Bar;
impl Bar {
    fn hash<T>(&self, _: T) {}
}
#[derive(Hash)]
struct Foo(Bar);

The derived code should probably use UFCS.

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