Skip to content

Commit 5a6e995

Browse files
committed
Fix typos
1 parent cd90d5c commit 5a6e995

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

compiler/rustc_builtin_macros/src/deriving/mod.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ fn assert_ty_bounds(
123123
span: Span,
124124
assert_path: &[Symbol],
125125
) {
126-
// Deny anonymous structs or unions to avoid wierd errors.
126+
// Deny anonymous structs or unions to avoid weird errors.
127127
assert!(!ty.kind.is_anon_adt(), "Anonymous structs or unions cannot be type parameters");
128128
// Generate statement `let _: assert_path<ty>;`.
129129
let span = cx.with_def_site_ctxt(span);

compiler/rustc_builtin_macros/src/format.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn make_format_args(
316316

317317
let mut used = vec![false; args.explicit_args().len()];
318318
let mut invalid_refs = Vec::new();
319-
let mut numeric_refences_to_named_arg = Vec::new();
319+
let mut numeric_references_to_named_arg = Vec::new();
320320

321321
enum ArgRef<'a> {
322322
Index(usize),
@@ -337,7 +337,7 @@ fn make_format_args(
337337
used[index] = true;
338338
if arg.kind.ident().is_some() {
339339
// This was a named argument, but it was used as a positional argument.
340-
numeric_refences_to_named_arg.push((index, span, used_as));
340+
numeric_references_to_named_arg.push((index, span, used_as));
341341
}
342342
Ok(index)
343343
} else {
@@ -545,7 +545,7 @@ fn make_format_args(
545545
// Only check for unused named argument names if there are no other errors to avoid causing
546546
// too much noise in output errors, such as when a named argument is entirely unused.
547547
if invalid_refs.is_empty() && !has_unused && !unnamed_arg_after_named_arg {
548-
for &(index, span, used_as) in &numeric_refences_to_named_arg {
548+
for &(index, span, used_as) in &numeric_references_to_named_arg {
549549
let (position_sp_to_replace, position_sp_for_msg) = match used_as {
550550
Placeholder(pspan) => (span, pspan),
551551
Precision => {

0 commit comments

Comments
 (0)