From a9012a2ad183ad96238ccf2473b731be85eb12e1 Mon Sep 17 00:00:00 2001 From: Niko Matsakis Date: Thu, 13 Jun 2013 17:42:01 -0400 Subject: Make type parameters not implicitly copyable, even if they have the Copy bound. Consider: T:Copy could be bound to ~T, which is not implicitly copyable. --- src/librustc/middle/ty.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/librustc/middle/ty.rs b/src/librustc/middle/ty.rs index e161f35af09..77bf790131c 100644 --- a/src/librustc/middle/ty.rs +++ b/src/librustc/middle/ty.rs @@ -2273,7 +2273,7 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents { for type_param_def.bounds.builtin_bounds.each |bound| { debug!("tc = %s, bound = %?", tc.to_str(), bound); tc = tc - match bound { - BoundCopy => TypeContents::nonimplicitly_copyable(cx), + BoundCopy => TypeContents::noncopyable(cx), BoundStatic => TypeContents::nonstatic(cx), BoundOwned => TypeContents::nonowned(cx), BoundConst => TypeContents::nonconst(cx), -- cgit 1.4.1-3-g733a5