Skip to content

Commit a1882b2

Browse files
authored
Merge pull request #334 from dtolnay/underscorevar
Remove format var parsing workaround that targeted rustc 1.40 and older
2 parents 057c15c + 747ce20 commit a1882b2

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

impl/src/fmt.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,6 @@ impl Display<'_> {
9393
if formatvar.to_string().starts_with("r#") {
9494
formatvar = format_ident!("r_{}", formatvar);
9595
}
96-
if formatvar.to_string().starts_with('_') {
97-
// Work around leading underscore being rejected by 1.40 and
98-
// older compilers. https://github.com/rust-lang/rust/pull/66847
99-
formatvar = format_ident!("field_{}", formatvar);
100-
}
10196
out += &formatvar.to_string();
10297
if !named_args.insert(formatvar.clone()) {
10398
// Already specified in the format argument list.

0 commit comments

Comments
 (0)