about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbjorn3 <bjorn3@users.noreply.github.com>2019-10-25 21:11:29 +0200
committerbjorn3 <bjorn3@users.noreply.github.com>2019-10-25 21:39:02 +0200
commitf04867cafbf329f6755d28ff288dd89ef39e2b4d (patch)
tree9843954c08e7aad9f1b5f585f2c8405ed303550f /src
parent23f890f10202a71168c6424da0cdf94135d3c40c (diff)
downloadrust-f04867cafbf329f6755d28ff288dd89ef39e2b4d.tar.gz
rust-f04867cafbf329f6755d28ff288dd89ef39e2b4d.zip
Derive Eq and Hash for SourceInfo again
Diffstat (limited to 'src')
-rw-r--r--src/librustc/mir/mod.rs4
1 files changed, 3 insertions, 1 deletions
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<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,