From: bjorn3 Date: Fri, 25 Oct 2019 19:11:29 +0000 (+0200) Subject: Derive Eq and Hash for SourceInfo again X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=f04867cafbf329f6755d28ff288dd89ef39e2b4d;p=rust.git Derive Eq and Hash for SourceInfo again --- diff --git a/src/librustc/mir/mod.rs b/src/librustc/mir/mod.rs index fb9c95724c9..f7e0d0131de 100644 --- a/src/librustc/mir/mod.rs +++ b/src/librustc/mir/mod.rs @@ -467,7 +467,9 @@ impl rustc_serialize::UseSpecializedDecodable for ClearCrossCrate< /// Grouped information about the source code origin of a MIR entity. /// Intended to be inspected by diagnostics and debuginfo. /// Most passes can work with it as a whole, within a single function. -#[derive(Copy, Clone, Debug, PartialEq, RustcEncodable, RustcDecodable, HashStable)] +// The unoffical Cranelift backend, at least as of #65828, needs `SourceInfo` to implement `Eq` and +// `Hash`. Please ping @bjorn3 if removing them. +#[derive(Copy, Clone, Debug, Eq, PartialEq, RustcEncodable, RustcDecodable, Hash, HashStable)] pub struct SourceInfo { /// The source span for the AST pertaining to this MIR entity. pub span: Span,