Skip to content

Commit b50fd63

Browse files
committed
Fmt and warnings
1 parent 3c7678b commit b50fd63

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

compiler/rustc_middle/src/ty/adt.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use crate::ty::util::{Discr, IntTypeExt};
44
use rustc_data_structures::captures::Captures;
55
use rustc_data_structures::fingerprint::Fingerprint;
66
use rustc_data_structures::fx::FxHashMap;
7-
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
87
use rustc_data_structures::stable_hasher::HashingControls;
8+
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
99
use rustc_errors::ErrorReported;
1010
use rustc_hir as hir;
1111
use rustc_hir::def::{CtorKind, DefKind, Res};

compiler/rustc_middle/src/ty/impls_ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ use crate::mir;
66
use crate::ty;
77
use rustc_data_structures::fingerprint::Fingerprint;
88
use rustc_data_structures::fx::FxHashMap;
9-
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
109
use rustc_data_structures::stable_hasher::HashingControls;
10+
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, ToStableHashKey};
1111
use rustc_query_system::ich::StableHashingContext;
1212
use std::cell::RefCell;
1313
use std::mem;

compiler/rustc_query_system/src/ich/hcx.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ impl<'a> StableHashingContext<'a> {
6868
hashing_controls: HashingControls {
6969
hash_spans: hash_spans_initial,
7070
node_id_hashing_mode: NodeIdHashingMode::HashDefPath,
71-
}
71+
},
7272
}
7373
}
7474

compiler/rustc_query_system/src/ich/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//! ICH - Incremental Compilation Hash
22
3+
pub use self::hcx::StableHashingContext;
34
pub use rustc_data_structures::stable_hasher::NodeIdHashingMode;
4-
pub use self::hcx::{StableHashingContext};
55
use rustc_span::symbol::{sym, Symbol};
66

77
mod hcx;

compiler/rustc_span/src/hygiene.rs

+4-6
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ use crate::{HashStableContext, Span, DUMMY_SP};
3232
use crate::def_id::{CrateNum, DefId, StableCrateId, CRATE_DEF_ID, LOCAL_CRATE};
3333
use rustc_data_structures::fingerprint::Fingerprint;
3434
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
35-
use rustc_data_structures::stable_hasher::{HashStable, StableHasher, NodeIdHashingMode};
3635
use rustc_data_structures::stable_hasher::HashingControls;
36+
use rustc_data_structures::stable_hasher::{HashStable, NodeIdHashingMode, StableHasher};
3737
use rustc_data_structures::sync::{Lock, Lrc};
3838
use rustc_data_structures::unhash::UnhashMap;
3939
use rustc_index::vec::IndexVec;
@@ -94,11 +94,9 @@ rustc_index::newtype_index! {
9494
// with a non-default mode. With this check in place, we can avoid the need
9595
// to maintain separate versions of `ExpnData` hashes for each permutation
9696
// of `HashingControls` settings.
97-
fn assert_default_hashing_controls<CTX: HashStableContext>(ctx: &CTX, msg: &str) {
98-
let default = HashingControls {
99-
hash_spans: true,
100-
node_id_hashing_mode: NodeIdHashingMode::HashDefPath
101-
};
97+
fn assert_default_hashing_controls<CTX: HashStableContext>(ctx: &CTX, _msg: &str) {
98+
let default =
99+
HashingControls { hash_spans: true, node_id_hashing_mode: NodeIdHashingMode::HashDefPath };
102100
let current = ctx.hashing_controls();
103101
if current != default {
104102
//panic!("Attempted hashing of {msg} with non-default HashingControls: {:?}", current);

compiler/rustc_symbol_mangling/src/legacy.rs

-1
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ fn get_symbol_hash<'tcx>(
134134
// Especially, `VtableShim`s and `ReifyShim`s may overlap with their original
135135
// instances without this.
136136
discriminant(&instance.def).hash_stable(hcx, &mut hasher);
137-
138137
});
139138
});
140139
});

0 commit comments

Comments
 (0)