Skip to content

Commit

Permalink
Fmt and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaron1011 committed Dec 24, 2021
1 parent 3c7678b commit b50fd63
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/adt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ use crate::ty::util::{Discr, IntTypeExt};
use rustc_data_structures::captures::Captures;
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_data_structures::stable_hasher::HashingControls;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use rustc_errors::ErrorReported;
use rustc_hir as hir;
use rustc_hir::def::{CtorKind, DefKind, Res};
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_middle/src/ty/impls_ty.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ use crate::mir;
use crate::ty;
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::FxHashMap;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
use rustc_data_structures::stable_hasher::HashingControls;
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
use rustc_query_system::ich::StableHashingContext;
use std::cell::RefCell;
use std::mem;
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_query_system/src/ich/hcx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl<'a> StableHashingContext<'a> {
hashing_controls: HashingControls {
hash_spans: hash_spans_initial,
node_id_hashing_mode: NodeIdHashingMode::HashDefPath,
}
},
}
}

Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_query_system/src/ich/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
//! ICH - Incremental Compilation Hash

pub use self::hcx::StableHashingContext;
pub use rustc_data_structures::stable_hasher::NodeIdHashingMode;
pub use self::hcx::{StableHashingContext};
use rustc_span::symbol::{sym, Symbol};

mod hcx;
Expand Down
10 changes: 4 additions & 6 deletions compiler/rustc_span/src/hygiene.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ use crate::{HashStableContext, Span, DUMMY_SP};
use crate::def_id::{CrateNum, DefId, StableCrateId, CRATE_DEF_ID, LOCAL_CRATE};
use rustc_data_structures::fingerprint::Fingerprint;
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, NodeIdHashingMode};
use rustc_data_structures::stable_hasher::HashingControls;
use rustc_data_structures::stable_hasher::{HashStable, NodeIdHashingMode, StableHasher};
use rustc_data_structures::sync::{Lock, Lrc};
use rustc_data_structures::unhash::UnhashMap;
use rustc_index::vec::IndexVec;
Expand Down Expand Up @@ -94,11 +94,9 @@ rustc_index::newtype_index! {
// with a non-default mode. With this check in place, we can avoid the need
// to maintain separate versions of `ExpnData` hashes for each permutation
// of `HashingControls` settings.
fn assert_default_hashing_controls<CTX: HashStableContext>(ctx: &CTX, msg: &str) {
let default = HashingControls {
hash_spans: true,
node_id_hashing_mode: NodeIdHashingMode::HashDefPath
};
fn assert_default_hashing_controls<CTX: HashStableContext>(ctx: &CTX, _msg: &str) {
let default =
HashingControls { hash_spans: true, node_id_hashing_mode: NodeIdHashingMode::HashDefPath };
let current = ctx.hashing_controls();
if current != default {
//panic!("Attempted hashing of {msg} with non-default HashingControls: {:?}", current);
Expand Down
1 change: 0 additions & 1 deletion compiler/rustc_symbol_mangling/src/legacy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ fn get_symbol_hash<'tcx>(
// Especially, `VtableShim`s and `ReifyShim`s may overlap with their original
// instances without this.
discriminant(&instance.def).hash_stable(hcx, &mut hasher);

});
});
});
Expand Down

0 comments on commit b50fd63

Please sign in to comment.