10000 Readd some PartialEq and Hash derives used by Clippy by flip1995 · Pull Request #65690 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Readd some PartialEq and Hash derives used by Clippy #65690

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
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Readd some PartialEq and Hash derives used by Clippy
  • Loading branch information
flip1995 committed Oct 22, 2019
commit be936b367a1597f03c9aa7a66b550d48c2d04bb5
9 changes: 6 additions & 3 deletions src/libsyntax/ast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1305,7 +1305,8 @@ impl MacroDef {
}
}

#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy)]
// Clippy uses Hash and PartialEq
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, Hash, PartialEq)]
pub enum StrStyle {
/// A regular string, like `"foo"`.
Cooked,
Expand All @@ -1327,7 +1328,8 @@ pub struct Lit {
pub span: Span,
}

#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy)]
// Clippy uses Hash and PartialEq
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Copy, Hash, PartialEq)]
pub enum LitIntType {
Signed(IntTy),
Unsigned(UintTy),
Expand All @@ -1337,7 +1339,8 @@ pub enum LitIntType {
/// Literal kind.
///
/// E.g., `"foo"`, `42`, `12.34`, or `bool`.
#[derive(Clone, RustcEncodable, RustcDecodable, Debug)]
// Clippy uses Hash and PartialEq
#[derive(Clone, RustcEncodable, RustcDecodable, Debug, Hash, PartialEq)]
pub enum LitKind {
/// A string literal (`"foo"`).
Str(Symbol, StrStyle),
Expand Down
0