about summary refs log tree commit diff
path: root/src/librustc
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2020-01-16 23:15:52 +0100
committerMatthias Krüger <matthias.krueger@famsik.de>2020-01-16 23:48:49 +0100
commit7fbd30b1ae0ce9293302bbf4bfb814f1dc791107 (patch)
tree5499d1a8da34237b9e85748fa9fa5ed903e0e3b4 /src/librustc
parent48840618382eccb8a799320c8e5d08e3b52f4c42 (diff)
downloadrust-7fbd30b1ae0ce9293302bbf4bfb814f1dc791107.tar.gz
rust-7fbd30b1ae0ce9293302bbf4bfb814f1dc791107.zip
don't clone types that are copy
found via clippy
Diffstat (limited to 'src/librustc')
-rw-r--r--src/librustc/infer/error_reporting/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc/infer/error_reporting/mod.rs b/src/librustc/infer/error_reporting/mod.rs
index c52d4335ea1..febf4f21a67 100644
--- a/src/librustc/infer/error_reporting/mod.rs
+++ b/src/librustc/infer/error_reporting/mod.rs
@@ -2008,7 +2008,7 @@ impl<'tcx> ObligationCause<'tcx> {
                 TypeError::IntrinsicCast => {
                     Error0308("cannot coerce intrinsics to function pointers")
                 }
-                TypeError::ObjectUnsafeCoercion(did) => Error0038(did.clone()),
+                TypeError::ObjectUnsafeCoercion(did) => Error0038(*did),
                 _ => Error0308("mismatched types"),
             },
         }