Skip to content

Commit 8655ffb

Browse files
committed
Fix violations of non_camel_case_types
1 parent 9401707 commit 8655ffb

File tree

47 files changed

+362
-363
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+362
-363
lines changed

compiler/rustc_ast/src/ast.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ impl PartialEq<Symbol> for Path {
101101
}
102102
}
103103

104-
impl<CTX: rustc_span::HashStableContext> HashStable<CTX> for Path {
105-
fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
104+
impl<Ctx: rustc_span::HashStableContext> HashStable<Ctx> for Path {
105+
fn hash_stable(&self, hcx: &mut Ctx, hasher: &mut StableHasher) {
106106
self.segments.len().hash_stable(hcx, hasher);
107107
for segment in &self.segments {
108108
segment.ident.hash_stable(hcx, hasher);
@@ -1680,11 +1680,11 @@ impl AttrArgs {
16801680
}
16811681
}
16821682

1683-
impl<CTX> HashStable<CTX> for AttrArgs
1683+
impl<Ctx> HashStable<Ctx> for AttrArgs
16841684
where
1685-
CTX: crate::HashStableContext,
1685+
Ctx: crate::HashStableContext,
16861686
{
1687-
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
1687+
fn hash_stable(&self, ctx: &mut Ctx, hasher: &mut StableHasher) {
16881688
mem::discriminant(self).hash_stable(ctx, hasher);
16891689
match self {
16901690
AttrArgs::Empty => {}
@@ -1716,11 +1716,11 @@ impl DelimArgs {
17161716
}
17171717
}
17181718

1719-
impl<CTX> HashStable<CTX> for DelimArgs
1719+
impl<Ctx> HashStable<Ctx> for DelimArgs
17201720
where
1721-
CTX: crate::HashStableContext,
1721+
Ctx: crate::HashStableContext,
17221722
{
1723-
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
1723+
fn hash_stable(&self, ctx: &mut Ctx, hasher: &mut StableHasher) {
17241724
let DelimArgs { dspan, delim, tokens } = self;
17251725
dspan.hash_stable(ctx, hasher);
17261726
delim.hash_stable(ctx, hasher);

compiler/rustc_ast/src/ptr.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -202,11 +202,11 @@ impl<D: Decoder, T: Decodable<D>> Decodable<D> for P<[T]> {
202202
}
203203
}
204204

205-
impl<CTX, T> HashStable<CTX> for P<T>
205+
impl<Ctx, T> HashStable<Ctx> for P<T>
206206
where
207-
T: ?Sized + HashStable<CTX>,
207+
T: ?Sized + HashStable<Ctx>,
208208
{
209-
fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
209+
fn hash_stable(&self, hcx: &mut Ctx, hasher: &mut StableHasher) {
210210
(**self).hash_stable(hcx, hasher);
211211
}
212212
}

compiler/rustc_ast/src/token.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -948,11 +948,11 @@ impl fmt::Debug for Nonterminal {
948948
}
949949
}
950950

951-
impl<CTX> HashStable<CTX> for Nonterminal
951+
impl<Ctx> HashStable<Ctx> for Nonterminal
952952
where
953-
CTX: crate::HashStableContext,
953+
Ctx: crate::HashStableContext,
954954
{
955-
fn hash_stable(&self, _hcx: &mut CTX, _hasher: &mut StableHasher) {
955+
fn hash_stable(&self, _hcx: &mut Ctx, _hasher: &mut StableHasher) {
956956
panic!("interpolated tokens should not be present in the HIR")
957957
}
958958
}

compiler/rustc_ast/src/tokenstream.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -110,11 +110,11 @@ impl TokenTree {
110110
}
111111
}
112112

113-
impl<CTX> HashStable<CTX> for TokenStream
113+
impl<Ctx> HashStable<Ctx> for TokenStream
114114
where
115-
CTX: crate::HashStableContext,
115+
Ctx: crate::HashStableContext,
116116
{
117-
fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
117+
fn hash_stable(&self, hcx: &mut Ctx, hasher: &mut StableHasher) {
118118
for sub_tt in self.trees() {
119119
sub_tt.hash_stable(hcx, hasher);
120120
}
@@ -166,8 +166,8 @@ impl<D: Decoder> Decodable<D> for LazyAttrTokenStream {
166166
}
167167
}
168168

169-
impl<CTX> HashStable<CTX> for LazyAttrTokenStream {
170-
fn hash_stable(&self, _hcx: &mut CTX, _hasher: &mut StableHasher) {
169+
impl<Ctx> HashStable<Ctx> for LazyAttrTokenStream {
170+
fn hash_stable(&self, _hcx: &mut Ctx, _hasher: &mut StableHasher) {
171171
panic!("Attempted to compute stable hash for LazyAttrTokenStream");
172172
}
173173
}

compiler/rustc_codegen_cranelift/src/driver/aot.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ enum OngoingModuleCodegen {
3333
Async(JoinHandle<Result<ModuleCodegenResult, String>>),
3434
}
3535

36-
impl<HCX> HashStable<HCX> for OngoingModuleCodegen {
37-
fn hash_stable(&self, _: &mut HCX, _: &mut StableHasher) {
36+
impl<Hcx> HashStable<Hcx> for OngoingModuleCodegen {
37+
fn hash_stable(&self, _: &mut Hcx, _: &mut StableHasher) {
3838
// do nothing
3939
}
4040
}

compiler/rustc_codegen_ssa/src/common.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -109,8 +109,8 @@ mod temp_stable_hash_impls {
109109
use crate::ModuleCodegen;
110110
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
111111

112-
impl<HCX, M> HashStable<HCX> for ModuleCodegen<M> {
113-
fn hash_stable(&self, _: &mut HCX, _: &mut StableHasher) {
112+
impl<Hcx, M> HashStable<Hcx> for ModuleCodegen<M> {
113+
fn hash_stable(&self, _: &mut Hcx, _: &mut StableHasher) {
114114
// do nothing
115115
}
116116
}

compiler/rustc_data_structures/src/intern.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,11 @@ impl<'a, T> Hash for Interned<'a, T> {
9999
}
100100
}
101101

102-
impl<T, CTX> HashStable<CTX> for Interned<'_, T>
102+
impl<T, Ctx> HashStable<Ctx> for Interned<'_, T>
103103
where
104-
T: HashStable<CTX>,
104+
T: HashStable<Ctx>,
105105
{
106-
fn hash_stable(&self, hcx: &mut CTX, hasher: &mut StableHasher) {
106+
fn hash_stable(&self, hcx: &mut Ctx, hasher: &mut StableHasher) {
107107
self.0.hash_stable(hcx, hasher);
108108
}
109109
}

compiler/rustc_data_structures/src/obligation_forest/mod.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ pub trait ForestObligation: Clone + Debug {
9595
pub trait ObligationProcessor {
9696
type Obligation: ForestObligation;
9797
type Error: Debug;
98-
type OUT: OutcomeTrait<Obligation = Self::Obligation, Error = Error<Self::Obligation, Self::Error>>;
98+
type Out: OutcomeTrait<Obligation = Self::Obligation, Error = Error<Self::Obligation, Self::Error>>;
9999

100100
/// Implementations can provide a fast-path to obligation-processing
101101
/// by counting the prefix of the passed iterator for which
@@ -416,11 +416,11 @@ impl<O: ForestObligation> ObligationForest<O> {
416416

417417
/// Performs a fixpoint computation over the obligation list.
418418
#[inline(never)]
419-
pub fn process_obligations<P>(&mut self, processor: &mut P) -> P::OUT
419+
pub fn process_obligations<P>(&mut self, processor: &mut P) -> P::Out
420420
where
421421
P: ObligationProcessor<Obligation = O>,
422422
{
423-
let mut outcome = P::OUT::new();
423+
let mut outcome = P::Out::new();
424424

425425
// Fixpoint computation: we repeat until the inner loop stalls.
426426
loop {
@@ -576,7 +576,7 @@ impl<O: ForestObligation> ObligationForest<O> {
576576

577577
/// Report cycles between all `Success` nodes, and convert all `Success`
578578
/// nodes to `Done`. This must be called after `mark_successes`.
579-
fn process_cycles<P>(&mut self, processor: &mut P, outcome: &mut P::OUT)
579+
fn process_cycles<P>(&mut self, processor: &mut P, outcome: &mut P::Out)
580580
where
581581
P: ObligationProcessor<Obligation = O>,
582582
{
@@ -599,7 +599,7 @@ impl<O: ForestObligation> ObligationForest<O> {
599599
stack: &mut Vec<usize>,
600600
processor: &mut P,
601601
index: usize,
602-
outcome: &mut P::OUT,
602+
outcome: &mut P::Out,
603603
) where
604604
P: ObligationProcessor<Obligation = O>,
605605
{

compiler/rustc_data_structures/src/profiling.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ impl SelfProfiler {
622622

623623
/// Allocates a new string in the profiling data. Does not do any caching
624624
/// or deduplication.
625-
pub fn alloc_string<STR: SerializableString + ?Sized>(&self, s: &STR) -> StringId {
625+
pub fn alloc_string<Str: SerializableString + ?Sized>(&self, s: &Str) -> StringId {
626626
self.profiler.alloc_string(s)
627627
}
628628

compiler/rustc_data_structures/src/sorted_map.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -306,9 +306,9 @@ impl<K: Ord, V> FromIterator<(K, V)> for SortedMap<K, V> {
306306
}
307307
}
308308

309-
impl<K: HashStable<CTX> + StableOrd, V: HashStable<CTX>, CTX> HashStable<CTX> for SortedMap<K, V> {
309+
impl<K: HashStable<Ctx> + StableOrd, V: HashStable<Ctx>, Ctx> HashStable<Ctx> for SortedMap<K, V> {
310310
#[inline]
311-
fn hash_stable(&self, ctx: &mut CTX, hasher: &mut StableHasher) {
311+
fn hash_stable(&self, ctx: &mut Ctx, hasher: &mut StableHasher) {
312312
self.data.hash_stable(ctx, hasher);
313313
}
314314
}

0 commit comments

Comments
 (0)