Skip to content

Regression in #[derive(Eq)] on type with non-Eq members. #36830

Closed
@rphmeier

Description

@rphmeier

Playground: https://play.rust-lang.org/?gist=ca6a481e640668153d66259c0ef1dde6&version=stable&backtrace=0

#[derive(Eq)]
pub struct Signature([u8; 65]);

impl PartialEq for Signature {
    fn eq(&self, other: &Self) -> bool {
        &self.0[..] == &other.0[..]
    }
}

fn main() { }

Succeeds on rustc 1.11.0 (9b21dcd6a 2016-08-15), but fails on rustc 1.13.0-beta.1 (cbbeba430 2016-09-28)

Seems to be related to std::cmp::AssertParamIsEq.

Metadata

Metadata

Assignees

Labels

T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions