From 747ce20cc28d62d564ba0a6f0b01e5fef22e93de Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Thu, 31 Oct 2024 21:23:45 -0700 Subject: [PATCH] Remove format var parsing workaround that targeted rustc 1.40 and older --- impl/src/fmt.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/impl/src/fmt.rs b/impl/src/fmt.rs index b38b7bf1..c036536a 100644 --- a/impl/src/fmt.rs +++ b/impl/src/fmt.rs @@ -93,11 +93,6 @@ impl Display<'_> { if formatvar.to_string().starts_with("r#") { formatvar = format_ident!("r_{}", formatvar); } - if formatvar.to_string().starts_with('_') { - // Work around leading underscore being rejected by 1.40 and - // older compilers. https://github.com/rust-lang/rust/pull/66847 - formatvar = format_ident!("field_{}", formatvar); - } out += &formatvar.to_string(); if !named_args.insert(formatvar.clone()) { // Already specified in the format argument list.