Skip to content

Commit d0d284e

Browse files
authored
Rollup merge of #65828 - bjorn3:add_source_info_eq_hash, r=petrochenkov
Derive Eq and Hash for SourceInfo again In https://github.com/bjorn3/rustc_codegen_cranelift/blob/75c24b9c9677600422ec86fa9f4c78fe3678d2ce/src/common.rs#L368 I store it in a `indexmap::IndexSet`, which requires `Eq` and `Hash`. Unfortunately they were removed in #65647, so I can't update to latest nightly.
2 parents 84b62a0 + f04867c commit d0d284e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/librustc/mir/mod.rs

+3-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,9 @@ impl<T: Decodable> rustc_serialize::UseSpecializedDecodable for ClearCrossCrate<
467467
/// Grouped information about the source code origin of a MIR entity.
468468
/// Intended to be inspected by diagnostics and debuginfo.
469469
/// Most passes can work with it as a whole, within a single function.
470-
#[derive(Copy, Clone, Debug, PartialEq, RustcEncodable, RustcDecodable, HashStable)]
470+
// The unoffical Cranelift backend, at least as of #65828, needs `SourceInfo` to implement `Eq` and
471+
// `Hash`. Please ping @bjorn3 if removing them.
472+
#[derive(Copy, Clone, Debug, Eq, PartialEq, RustcEncodable, RustcDecodable, Hash, HashStable)]
471473
pub struct SourceInfo {
472474
/// The source span for the AST pertaining to this MIR entity.
473475
pub span: Span,

0 commit comments

Comments
 (0)