We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
derivative(Eq)
Eq
The following compiles but shouldn't because Error is only PartialEq and not Eq:
Error
PartialEq
#[derive(derivative::Derivative)] #[derivative(PartialEq)] struct Error; #[derive(derivative::Derivative)] #[derivative(PartialEq, Eq)] struct Struct { x: Error, } fn main() {}
(Permalink to the playground)
Similarly
#[derive(PartialEq, Eq)] struct Struct { x: f32, }
shouldn't compile.
rustc enforces this using secret methods: rust-lang/rust#13101
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The following compiles but shouldn't because
Error
is onlyPartialEq
and notEq
:(Permalink to the playground)
Similarly
shouldn't compile.
rustc enforces this using secret methods: rust-lang/rust#13101
The text was updated successfully, but these errors were encountered: