diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2013-06-13 17:42:01 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2013-06-16 12:47:36 -0400 |
| commit | a9012a2ad183ad96238ccf2473b731be85eb12e1 (patch) | |
| tree | 012335ef2d6eb6b8a53a76514c48b8ef3a12e0b2 | |
| parent | e7b0b71197bb246c3213914919bdb959f39a8f74 (diff) | |
| download | rust-a9012a2ad183ad96238ccf2473b731be85eb12e1.tar.gz rust-a9012a2ad183ad96238ccf2473b731be85eb12e1.zip | |
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.
| -rw-r--r-- | src/librustc/middle/ty.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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), |
