]> git.lizzy.rs Git - rust.git/commitdiff
Derive Eq and Hash for SourceInfo again
authorbjorn3 <bjorn3@users.noreply.github.com>
Fri, 25 Oct 2019 19:11:29 +0000 (21:11 +0200)
committerbjorn3 <bjorn3@users.noreply.github.com>
Fri, 25 Oct 2019 19:39:02 +0000 (21:39 +0200)
src/librustc/mir/mod.rs

index fb9c95724c955e90e1225c6a5d9db99147c33dca..f7e0d0131dea29cd45cd5dc13c6300702bc45836 100644 (file)
@@ -467,7 +467,9 @@ impl<T: Decodable> 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,