From fda71d676d07415f78c7835a6fa67b6aacb62c97 Mon Sep 17 00:00:00 2001 From: LingMan Date: Fri, 12 Feb 2021 10:27:08 +0100 Subject: [PATCH] Push a `char` instead of a `str` with len one into a String --- compiler/rustc_typeck/src/check/upvar.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/rustc_typeck/src/check/upvar.rs b/compiler/rustc_typeck/src/check/upvar.rs index 04a9e65e664..4f90f2877ed 100644 --- a/compiler/rustc_typeck/src/check/upvar.rs +++ b/compiler/rustc_typeck/src/check/upvar.rs @@ -1211,7 +1211,7 @@ fn construct_place_string(tcx: TyCtxt<'_>, place: &Place<'tcx>) -> String { ProjectionKind::Subslice => String::from("Subslice"), }; if i != 0 { - projections_str.push_str(","); + projections_str.push(','); } projections_str.push_str(proj.as_str()); }