Skip to content

Commit e48b833

Browse files
committed
fix few comment typos in compiler
1 parent d61f55d commit e48b833

File tree

23 files changed

+27
-27
lines changed

23 files changed

+27
-27
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1194,7 +1194,7 @@ impl Expr {
11941194
}
11951195
}
11961196

1197-
/// Returns an expression with (when possible) *one* outter brace removed
1197+
/// Returns an expression with (when possible) *one* outer brace removed
11981198
pub fn maybe_unwrap_block(&self) -> &Expr {
11991199
if let ExprKind::Block(block, None) = &self.kind
12001200
&& let [stmt] = block.stmts.as_slice()

compiler/rustc_codegen_llvm/src/va_arg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ fn emit_xtensa_va_arg<'ll, 'tcx>(
365365

366366
// On big-endian, for values smaller than the slot size we'd have to align the read to the end
367367
// of the slot rather than the start. While the ISA and GCC support big-endian, all the Xtensa
368-
// targets supported by rustc are litte-endian so don't worry about it.
368+
// targets supported by rustc are little-endian so don't worry about it.
369369

370370
// if from_regsave {
371371
// unsafe { *regsave_value_ptr }

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3009,7 +3009,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
30093009
// Supported architecture names can be found in the source:
30103010
// https://github.com/apple-oss-distributions/ld64/blob/ld64-951.9/src/abstraction/MachOFileAbstraction.hpp#L578-L648
30113011
//
3012-
// Intentially verbose to ensure that the list always matches correctly
3012+
// Intentionally verbose to ensure that the list always matches correctly
30133013
// with the list in the source above.
30143014
let ld64_arch = match llvm_arch {
30153015
"armv7k" => "armv7k",
@@ -3077,7 +3077,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
30773077
// We do not currently know the actual SDK version though, so we have a few options:
30783078
// 1. Use the minimum version supported by rustc.
30793079
// 2. Use the same as the deployment target.
3080-
// 3. Use an arbitary recent version.
3080+
// 3. Use an arbitrary recent version.
30813081
// 4. Omit the version.
30823082
//
30833083
// The first option is too low / too conservative, and means that users will not get the

compiler/rustc_codegen_ssa/src/back/metadata.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ pub(crate) fn create_object_file(sess: &Session) -> Option<write::Object<'static
408408
/// Mach-O files contain information about:
409409
/// - The platform/OS they were built for (macOS/watchOS/Mac Catalyst/iOS simulator etc).
410410
/// - The minimum OS version / deployment target.
411-
/// - The version of the SDK they were targetting.
411+
/// - The version of the SDK they were targeting.
412412
///
413413
/// In the past, this was accomplished using the LC_VERSION_MIN_MACOSX, LC_VERSION_MIN_IPHONEOS,
414414
/// LC_VERSION_MIN_TVOS or LC_VERSION_MIN_WATCHOS load commands, which each contain information

compiler/rustc_codegen_ssa/src/traits/builder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub trait BuilderMethods<'a, 'tcx>:
8989
//
9090
// This function is opt-in for back ends.
9191
//
92-
// The default implementation calls `self.expect()` before emiting the branch
92+
// The default implementation calls `self.expect()` before emitting the branch
9393
// by calling `self.cond_br()`
9494
fn cond_br_with_expect(
9595
&mut self,

compiler/rustc_const_eval/src/util/check_validity_requirement.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ fn check_validity_requirement_strict<'tcx>(
6868
// require dereferenceability also require non-null, we don't actually get any false negatives
6969
// due to this.
7070
// The value we are validating is temporary and discarded at the end of this function, so
71-
// there is no point in reseting provenance and padding.
71+
// there is no point in resetting provenance and padding.
7272
Ok(cx
7373
.validate_operand(
7474
&allocated.into(),

compiler/rustc_data_structures/src/vec_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ unsafe impl<K: Idx, #[may_dangle] V, I> Drop for VecCache<K, V, I> {
244244
// we are also guaranteed to just need to deallocate any large arrays (not iterate over
245245
// contents).
246246
//
247-
// Confirm no need to deallocate invidual entries. Note that `V: Copy` is asserted on
247+
// Confirm no need to deallocate individual entries. Note that `V: Copy` is asserted on
248248
// insert/lookup but not necessarily construction, primarily to avoid annoyingly propagating
249249
// the bounds into struct definitions everywhere.
250250
assert!(!std::mem::needs_drop::<K>());

compiler/rustc_errors/src/markdown/parse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ fn normalize<'a>(MdStream(stream): MdStream<'a>, linkdefs: &mut Vec<MdTree<'a>>)
358358
let new_defs = stream.iter().filter(|tt| matches!(tt, MdTree::LinkDef { .. }));
359359
linkdefs.extend(new_defs.cloned());
360360

361-
// Run plaintest expansions on types that need it, call this function on nested types
361+
// Run plaintext expansions on types that need it, call this function on nested types
362362
for item in stream {
363363
match item {
364364
MdTree::PlainText(txt) => expand_plaintext(txt, &mut new_stream, MdTree::PlainText),

compiler/rustc_hir_typeck/src/fn_ctxt/checks.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2661,7 +2661,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
26612661
}
26622662

26632663
/// Returns the parameters of a function, with their generic parameters if those are the full
2664-
/// type of that parameter. Returns `None` if the function body is unavailable (eg is an instrinsic).
2664+
/// type of that parameter. Returns `None` if the function body is unavailable (eg is an intrinsic).
26652665
fn get_hir_params_with_generics(
26662666
&self,
26672667
def_id: DefId,

compiler/rustc_lint/src/if_let_rescope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ impl IfLetRescope {
211211
}
212212
}
213213
}
214-
// At this point, any `if let` fragment in the cascade is definitely preceeded by `else`,
214+
// At this point, any `if let` fragment in the cascade is definitely preceded by `else`,
215215
// so a opening bracket is mandatory before each `match`.
216216
add_bracket_to_match_head = true;
217217
if let Some(alt) = alt {

0 commit comments

Comments
 (0)