Skip to content

Commit 5ebbb28

Browse files
committed
variable naming
1 parent 3e62c12 commit 5ebbb28

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

compiler/rustc_middle/src/traits/specialization_graph.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,14 @@ pub struct Children {
5555
// Impls of a trait (or specializations of a given impl). To allow for
5656
// quicker lookup, the impls are indexed by a simplified version of their
5757
// `Self` type: impls with a simplifiable `Self` are stored in
58-
// `nonblanket_impls` keyed by it, while all other impls are stored in
58+
// `non_blanket_impls` keyed by it, while all other impls are stored in
5959
// `blanket_impls`.
6060
//
6161
// A similar division is used within `TraitDef`, but the lists there collect
6262
// together *all* the impls for a trait, and are populated prior to building
6363
// the specialization graph.
6464
/// Impls of the trait.
65-
pub nonblanket_impls: BTreeMap<StableSimplifiedType, Vec<DefId>>,
65+
pub non_blanket_impls: BTreeMap<StableSimplifiedType, Vec<DefId>>,
6666

6767
/// Blanket impls associated with the trait.
6868
pub blanket_impls: Vec<DefId>,
@@ -238,8 +238,8 @@ pub fn ancestors(
238238

239239
impl<'a> HashStable<StableHashingContext<'a>> for Children {
240240
fn hash_stable(&self, hcx: &mut StableHashingContext<'a>, hasher: &mut StableHasher) {
241-
let Children { ref nonblanket_impls, ref blanket_impls } = *self;
241+
let Children { ref non_blanket_impls, ref blanket_impls } = *self;
242242

243-
ich::hash_stable_trait_impls(hcx, hasher, blanket_impls, nonblanket_impls);
243+
ich::hash_stable_trait_impls(hcx, hasher, blanket_impls, non_blanket_impls);
244244
}
245245
}

compiler/rustc_trait_selection/src/traits/specialize/specialization_graph.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ impl ChildrenExt for Children {
5050
let trait_ref = tcx.impl_trait_ref(impl_def_id).unwrap();
5151
if let Some(st) = fast_reject::simplify_type(tcx, trait_ref.self_ty(), false) {
5252
debug!("insert_blindly: impl_def_id={:?} st={:?}", impl_def_id, st);
53-
self.nonblanket_impls.entry(st.to_stable(tcx)).or_default().push(impl_def_id)
53+
self.non_blanket_impls.entry(st.to_stable(tcx)).or_default().push(impl_def_id)
5454
} else {
5555
debug!("insert_blindly: impl_def_id={:?} st=None", impl_def_id);
5656
self.blanket_impls.push(impl_def_id)
@@ -65,7 +65,7 @@ impl ChildrenExt for Children {
6565
let vec: &mut Vec<DefId>;
6666
if let Some(st) = fast_reject::simplify_type(tcx, trait_ref.self_ty(), false) {
6767
debug!("remove_existing: impl_def_id={:?} st={:?}", impl_def_id, st);
68-
vec = self.nonblanket_impls.get_mut(&st.to_stable(tcx)).unwrap();
68+
vec = self.non_blanket_impls.get_mut(&st.to_stable(tcx)).unwrap();
6969
} else {
7070
debug!("remove_existing: impl_def_id={:?} st=None", impl_def_id);
7171
vec = &mut self.blanket_impls;
@@ -216,15 +216,15 @@ impl ChildrenExt for Children {
216216
}
217217

218218
fn iter_children(children: &mut Children) -> impl Iterator<Item = DefId> + '_ {
219-
let nonblanket = children.nonblanket_impls.iter_mut().flat_map(|(_, v)| v.iter());
219+
let nonblanket = children.non_blanket_impls.iter_mut().flat_map(|(_, v)| v.iter());
220220
children.blanket_impls.iter().chain(nonblanket).cloned()
221221
}
222222

223223
fn filtered_children(
224224
children: &mut Children,
225225
st: StableSimplifiedType,
226226
) -> impl Iterator<Item = DefId> + '_ {
227-
let nonblanket = children.nonblanket_impls.entry(st).or_default().iter();
227+
let nonblanket = children.non_blanket_impls.entry(st).or_default().iter();
228228
children.blanket_impls.iter().chain(nonblanket).cloned()
229229
}
230230

0 commit comments

Comments
 (0)