Rollup merge of #65828 - bjorn3:add_source_info_eq_hash, r=petrochenkov
Derive Eq and Hash for SourceInfo again
In 75c24b9c96/src/common.rs (L368)
I store it in a `indexmap::IndexSet`, which requires `Eq` and `Hash`. Unfortunately they were removed in https://github.com/rust-lang/rust/pull/65647, so I can't update to latest nightly.
This commit is contained in:
commit
d0d284eb39
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user