Skip to content

Commit 7e9e472

Browse files
committed
fix few comment typos in compiler
1 parent f46ce66 commit 7e9e472

File tree

28 files changed

+40
-40
lines changed

28 files changed

+40
-40
lines changed

compiler/rustc_ast/src/ast.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,7 @@ impl Expr {
13441344
}
13451345
}
13461346

1347-
/// Returns an expression with (when possible) *one* outter brace removed
1347+
/// Returns an expression with (when possible) *one* outer brace removed
13481348
pub fn maybe_unwrap_block(&self) -> &Expr {
13491349
if let ExprKind::Block(block, None) = &self.kind
13501350
&& 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
@@ -861,7 +861,7 @@ fn emit_xtensa_va_arg<'ll, 'tcx>(
861861

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

866866
// if from_regsave {
867867
// unsafe { *regsave_value_ptr }

compiler/rustc_codegen_ssa/messages.ftl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ codegen_ssa_thorin_missing_referenced_unit = unit {$unit} referenced by executab
289289
290290
codegen_ssa_thorin_missing_required_section = input object missing required section `{$section}`
291291
292-
codegen_ssa_thorin_mixed_input_encodings = input objects haved mixed encodings
292+
codegen_ssa_thorin_mixed_input_encodings = input objects have mixed encodings
293293
294294
codegen_ssa_thorin_multiple_debug_info_section = multiple `.debug_info.dwo` sections
295295

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,7 +3051,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
30513051
// Supported architecture names can be found in the source:
30523052
// https://github.com/apple-oss-distributions/ld64/blob/ld64-951.9/src/abstraction/MachOFileAbstraction.hpp#L578-L648
30533053
//
3054-
// Intentially verbose to ensure that the list always matches correctly
3054+
// Intentionally verbose to ensure that the list always matches correctly
30553055
// with the list in the source above.
30563056
let ld64_arch = match llvm_arch {
30573057
"armv7k" => "armv7k",
@@ -3118,7 +3118,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
31183118
// We do not currently know the actual SDK version though, so we have a few options:
31193119
// 1. Use the minimum version supported by rustc.
31203120
// 2. Use the same as the deployment target.
3121-
// 3. Use an arbitary recent version.
3121+
// 3. Use an arbitrary recent version.
31223122
// 4. Omit the version.
31233123
//
31243124
// 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
@@ -404,7 +404,7 @@ pub(super) fn elf_e_flags(architecture: Architecture, sess: &Session) -> u32 {
404404
/// Mach-O files contain information about:
405405
/// - The platform/OS they were built for (macOS/watchOS/Mac Catalyst/iOS simulator etc).
406406
/// - The minimum OS version / deployment target.
407-
/// - The version of the SDK they were targetting.
407+
/// - The version of the SDK they were targeting.
408408
///
409409
/// In the past, this was accomplished using the LC_VERSION_MIN_MACOSX, LC_VERSION_MIN_IPHONEOS,
410410
/// 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
@@ -87,7 +87,7 @@ pub trait BuilderMethods<'a, 'tcx>:
8787
//
8888
// This function is opt-in for back ends.
8989
//
90-
// The default implementation calls `self.expect()` before emiting the branch
90+
// The default implementation calls `self.expect()` before emitting the branch
9191
// by calling `self.cond_br()`
9292
fn cond_br_with_expect(
9393
&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
@@ -69,7 +69,7 @@ fn check_validity_requirement_strict<'tcx>(
6969
// require dereferenceability also require non-null, we don't actually get any false negatives
7070
// due to this.
7171
// The value we are validating is temporary and discarded at the end of this function, so
72-
// there is no point in reseting provenance and padding.
72+
// there is no point in resetting provenance and padding.
7373
cx.validate_operand(
7474
&allocated.into(),
7575
/*recursive*/ false,

compiler/rustc_data_structures/src/vec_cache.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ unsafe impl<K: Idx, #[may_dangle] V, I> Drop for VecCache<K, V, I> {
257257
// we are also guaranteed to just need to deallocate any large arrays (not iterate over
258258
// contents).
259259
//
260-
// Confirm no need to deallocate invidual entries. Note that `V: Copy` is asserted on
260+
// Confirm no need to deallocate individual entries. Note that `V: Copy` is asserted on
261261
// insert/lookup but not necessarily construction, primarily to avoid annoyingly propagating
262262
// the bounds into struct definitions everywhere.
263263
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
@@ -352,7 +352,7 @@ fn normalize<'a>(MdStream(stream): MdStream<'a>, linkdefs: &mut Vec<MdTree<'a>>)
352352
let new_defs = stream.iter().filter(|tt| matches!(tt, MdTree::LinkDef { .. }));
353353
linkdefs.extend(new_defs.cloned());
354354

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

compiler/rustc_lint/src/if_let_rescope.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ impl IfLetRescope {
230230
}
231231
}
232232
}
233-
// At this point, any `if let` fragment in the cascade is definitely preceeded by `else`,
233+
// At this point, any `if let` fragment in the cascade is definitely preceded by `else`,
234234
// so a opening bracket is mandatory before each `match`.
235235
add_bracket_to_match_head = true;
236236
if let Some(alt) = alt {

0 commit comments

Comments
 (0)