about summary refs log tree commit diff
path: root/src/librustc_mir/transform
diff options
context:
space:
mode:
authorljedrz <ljedrz@gmail.com>2018-07-28 14:40:32 +0200
committerljedrz <ljedrz@gmail.com>2018-07-28 17:58:52 +0200
commit421b2ba347a3a1afa41b91f4254f238c790fd73b (patch)
tree15947cbc18c8e87b2dd46204e387b629b553845b /src/librustc_mir/transform
parent4f1e2357447ef7e8066c49560d66c3e18f25d982 (diff)
downloadrust-421b2ba347a3a1afa41b91f4254f238c790fd73b.tar.gz
rust-421b2ba347a3a1afa41b91f4254f238c790fd73b.zip
Don't format!() string literals
Diffstat (limited to 'src/librustc_mir/transform')
-rw-r--r--src/librustc_mir/transform/check_unsafety.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_mir/transform/check_unsafety.rs b/src/librustc_mir/transform/check_unsafety.rs
index ab7629eb661..aba39966110 100644
--- a/src/librustc_mir/transform/check_unsafety.rs
+++ b/src/librustc_mir/transform/check_unsafety.rs
@@ -387,11 +387,11 @@ fn unsafe_derive_on_repr_packed<'a, 'tcx>(tcx: TyCtxt<'a, 'tcx, 'tcx>, def_id: D
     // FIXME: when we make this a hard error, this should have its
     // own error code.
     let message = if tcx.generics_of(def_id).own_counts().types != 0 {
-        format!("#[derive] can't be used on a #[repr(packed)] struct with \
-                 type parameters (error E0133)")
+        "#[derive] can't be used on a #[repr(packed)] struct with \
+         type parameters (error E0133)".to_string()
     } else {
-        format!("#[derive] can't be used on a #[repr(packed)] struct that \
-                 does not derive Copy (error E0133)")
+        "#[derive] can't be used on a #[repr(packed)] struct that \
+         does not derive Copy (error E0133)".to_string()
     };
     tcx.lint_node(SAFE_PACKED_BORROWS,
                   lint_node_id,