diff options
| author | Daniel Sedlak <daniel@sedlak.dev> | 2024-04-19 12:19:45 +0200 |
|---|---|---|
| committer | Daniel Sedlak <daniel@sedlak.dev> | 2024-04-23 20:06:04 +0200 |
| commit | 5a6e995980e8e8945677e59ff590460bf5de4d55 (patch) | |
| tree | 7b62186fcfeb11735a00d7fa55af83d83b2dd181 /compiler/rustc_builtin_macros/src/format.rs | |
| parent | cd90d5c03532da6f7ca7dcfb861ffabdc36a9d00 (diff) | |
| download | rust-5a6e995980e8e8945677e59ff590460bf5de4d55.tar.gz rust-5a6e995980e8e8945677e59ff590460bf5de4d55.zip | |
Fix typos
Diffstat (limited to 'compiler/rustc_builtin_macros/src/format.rs')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/format.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_builtin_macros/src/format.rs b/compiler/rustc_builtin_macros/src/format.rs index 51d6058a744..40b5595f919 100644 --- a/compiler/rustc_builtin_macros/src/format.rs +++ b/compiler/rustc_builtin_macros/src/format.rs @@ -316,7 +316,7 @@ fn make_format_args( let mut used = vec![false; args.explicit_args().len()]; let mut invalid_refs = Vec::new(); - let mut numeric_refences_to_named_arg = Vec::new(); + let mut numeric_references_to_named_arg = Vec::new(); enum ArgRef<'a> { Index(usize), @@ -337,7 +337,7 @@ fn make_format_args( used[index] = true; if arg.kind.ident().is_some() { // This was a named argument, but it was used as a positional argument. - numeric_refences_to_named_arg.push((index, span, used_as)); + numeric_references_to_named_arg.push((index, span, used_as)); } Ok(index) } else { @@ -545,7 +545,7 @@ fn make_format_args( // Only check for unused named argument names if there are no other errors to avoid causing // too much noise in output errors, such as when a named argument is entirely unused. if invalid_refs.is_empty() && !has_unused && !unnamed_arg_after_named_arg { - for &(index, span, used_as) in &numeric_refences_to_named_arg { + for &(index, span, used_as) in &numeric_references_to_named_arg { let (position_sp_to_replace, position_sp_for_msg) = match used_as { Placeholder(pspan) => (span, pspan), Precision => { |
