diff --git a/compiler/rustc_resolve/src/diagnostics.rs b/compiler/rustc_resolve/src/diagnostics.rs index 5d66d90e2c0..612bc3e7491 100644 --- a/compiler/rustc_resolve/src/diagnostics.rs +++ b/compiler/rustc_resolve/src/diagnostics.rs @@ -480,9 +480,7 @@ impl<'a> Resolver<'a> { ); if is_type { - err.note(&format!( - "type parameters are currently not permitted in anonymous constants" - )); + err.note("type parameters are currently not permitted in anonymous constants"); } else { err.help( &format!("it is currently only allowed to use either `{0}` or `{{ {0} }}` as generic constants",