diff options
| author | francorbacho <francorbacho@proton.me> | 2023-10-04 17:38:46 +0200 |
|---|---|---|
| committer | francorbacho <francorbacho@proton.me> | 2023-10-05 16:09:57 +0200 |
| commit | e1c18f4d9de902ad615035bfed4e173d72f7ff09 (patch) | |
| tree | b7717ccb07a49cb6b3554e5ed171f406ff17203b | |
| parent | 9c921f843c78a98b8b0eaa40f2b20b60543ebf53 (diff) | |
| download | rust-e1c18f4d9de902ad615035bfed4e173d72f7ff09.tar.gz rust-e1c18f4d9de902ad615035bfed4e173d72f7ff09.zip | |
Document report_redundant_format_arguments()
| -rw-r--r-- | compiler/rustc_builtin_macros/src/format.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_builtin_macros/src/format.rs b/compiler/rustc_builtin_macros/src/format.rs index 8cdab65b6b3..2d91de105cd 100644 --- a/compiler/rustc_builtin_macros/src/format.rs +++ b/compiler/rustc_builtin_macros/src/format.rs @@ -708,6 +708,8 @@ fn report_missing_placeholders( diag.emit(); } +/// This function detects and reports unused format!() arguments that are +/// redundant due to implicit captures (e.g. `format!("{x}", x)`). fn report_redundant_format_arguments( ecx: &mut ExtCtxt<'_>, fmt_span: Span, |
