Skip to content

Commit 2e00c6f

Browse files
authored
Rollup merge of #117911 - catandcoder:master, r=lqd
Fix some typos
2 parents 52f3a6f + a44a4ed commit 2e00c6f

File tree

9 files changed

+13
-13
lines changed

9 files changed

+13
-13
lines changed

compiler/rustc_codegen_llvm/src/callee.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ pub fn get_fn<'ll, 'tcx>(cx: &CodegenCx<'ll, 'tcx>, instance: Instance<'tcx>) ->
5959
// To avoid this, we set the Storage Class to "DllImport" so that
6060
// LLVM will prefix the name with `__imp_`. Ideally, we'd like the
6161
// existing logic below to set the Storage Class, but it has an
62-
// exemption for MinGW for backwards compatability.
62+
// exemption for MinGW for backwards compatibility.
6363
let llfn = cx.declare_fn(
6464
&common::i686_decorated_name(
6565
&dllimport,

compiler/rustc_const_eval/src/interpret/discriminant.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
119119
if matches!(ty.kind(), ty::Adt(def, ..) if def.variants().is_empty()) {
120120
throw_ub!(UninhabitedEnumVariantRead(index))
121121
}
122-
// For consisteny with `write_discriminant`, and to make sure that
122+
// For consistency with `write_discriminant`, and to make sure that
123123
// `project_downcast` cannot fail due to strange layouts, we declare immediate UB
124124
// for uninhabited variants.
125125
if op.layout().for_variant(self, index).abi.is_uninhabited() {
@@ -236,7 +236,7 @@ impl<'mir, 'tcx: 'mir, M: Machine<'mir, 'tcx>> InterpCx<'mir, 'tcx, M> {
236236
variant
237237
}
238238
};
239-
// For consisteny with `write_discriminant`, and to make sure that `project_downcast` cannot fail due to strange layouts, we declare immediate UB for uninhabited variants.
239+
// For consistency with `write_discriminant`, and to make sure that `project_downcast` cannot fail due to strange layouts, we declare immediate UB for uninhabited variants.
240240
if op.layout().for_variant(self, index).abi.is_uninhabited() {
241241
throw_ub!(UninhabitedEnumVariantRead(index))
242242
}

compiler/rustc_data_structures/src/sharded.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ impl<T> Sharded<T> {
7979
pub fn lock_shard_by_value<K: Hash + ?Sized>(&self, _val: &K) -> LockGuard<'_, T> {
8080
match self {
8181
Self::Single(single) => {
82-
// Syncronization is disabled so use the `lock_assume_no_sync` method optimized
82+
// Synchronization is disabled so use the `lock_assume_no_sync` method optimized
8383
// for that case.
8484

8585
// SAFETY: We know `is_dyn_thread_safe` was false when creating the lock thus
@@ -102,7 +102,7 @@ impl<T> Sharded<T> {
102102
pub fn lock_shard_by_index(&self, _i: usize) -> LockGuard<'_, T> {
103103
match self {
104104
Self::Single(single) => {
105-
// Syncronization is disabled so use the `lock_assume_no_sync` method optimized
105+
// Synchronization is disabled so use the `lock_assume_no_sync` method optimized
106106
// for that case.
107107

108108
// SAFETY: We know `is_dyn_thread_safe` was false when creating the lock thus
@@ -111,7 +111,7 @@ impl<T> Sharded<T> {
111111
}
112112
#[cfg(parallel_compiler)]
113113
Self::Shards(shards) => {
114-
// Syncronization is enabled so use the `lock_assume_sync` method optimized
114+
// Synchronization is enabled so use the `lock_assume_sync` method optimized
115115
// for that case.
116116

117117
// SAFETY (get_unchecked): The index gets ANDed with the shard mask, ensuring it is

compiler/rustc_data_structures/src/sync/lock.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ mod maybe_sync {
3838
lock: &'a Lock<T>,
3939
marker: PhantomData<&'a mut T>,
4040

41-
/// The syncronization mode of the lock. This is explicitly passed to let LLVM relate it
41+
/// The synchronization mode of the lock. This is explicitly passed to let LLVM relate it
4242
/// to the original lock operation.
4343
mode: Mode,
4444
}
@@ -142,7 +142,7 @@ mod maybe_sync {
142142
.then(|| LockGuard { lock: self, marker: PhantomData, mode })
143143
}
144144

145-
/// This acquires the lock assuming syncronization is in a specific mode.
145+
/// This acquires the lock assuming synchronization is in a specific mode.
146146
///
147147
/// Safety
148148
/// This method must only be called with `Mode::Sync` if `might_be_dyn_thread_safe` was

compiler/rustc_errors/src/markdown/parse.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ fn parse_with_end_pat<'a>(
329329
end_sep: &[u8],
330330
ignore_esc: bool,
331331
) -> Option<(&'a [u8], &'a [u8])> {
332-
// Find positions that start with the end seperator
332+
// Find positions that start with the end separator
333333
for idx in (0..buf.len()).filter(|idx| buf[*idx..].starts_with(end_sep)) {
334334
if !ignore_esc && idx > 0 && buf[idx - 1] == b'\\' {
335335
continue;

compiler/rustc_lint/src/reference_casting.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ fn is_cast_from_const_to_mut<'tcx>(
155155

156156
let start_ty = cx.typeck_results().node_type(e.hir_id);
157157
if let ty::Ref(_, inner_ty, Mutability::Not) = start_ty.kind() {
158-
// If an UnsafeCell method is involved we need to additionaly check the
158+
// If an UnsafeCell method is involved we need to additionally check the
159159
// inner type for the presence of the Freeze trait (ie does NOT contain
160160
// an UnsafeCell), since in that case we would incorrectly lint on valid casts.
161161
//

compiler/rustc_parse/src/parser/ty.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ impl<'a> Parser<'a> {
135135
)
136136
}
137137

138-
/// Parse a type suitable for a field defintion.
138+
/// Parse a type suitable for a field definition.
139139
/// The difference from `parse_ty` is that this version
140140
/// allows anonymous structs and unions.
141141
pub fn parse_ty_for_field_def(&mut self) -> PResult<'a, P<Ty>> {

compiler/rustc_passes/src/dead.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ impl<'tcx> MarkSymbolVisitor<'tcx> {
314314
// for the `#[expect]` case.
315315
//
316316
// Note that an item can and will be duplicated on the worklist with different
317-
// `ComesFromAllowExpect`, particulary if it was added from the
317+
// `ComesFromAllowExpect`, particularly if it was added from the
318318
// `effective_visibilities` query or from the `#[allow]`/`#[expect]` checks,
319319
// this "duplication" is essential as otherwise a function with `#[expect]`
320320
// called from a `pub fn` may be falsely reported as not live, falsely

compiler/rustc_privacy/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1756,7 +1756,7 @@ impl<'tcx> PrivateItemsInPublicInterfacesChecker<'tcx, '_> {
17561756
// fn from(_: Priv) -> Pub {...}
17571757
// }
17581758
//
1759-
// lints shouldn't be emmited even if `from` effective visibility
1759+
// lints shouldn't be emitted even if `from` effective visibility
17601760
// is larger than `Priv` nominal visibility and if `Priv` can leak
17611761
// in some scenarios due to type inference.
17621762
let impl_ev = EffectiveVisibility::of_impl::<false>(

0 commit comments

Comments
 (0)