Skip to content

Commit a9012a2

Browse files
committed
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.
1 parent e7b0b71 commit a9012a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustc/middle/ty.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2273,7 +2273,7 @@ pub fn type_contents(cx: ctxt, ty: t) -> TypeContents {
22732273
for type_param_def.bounds.builtin_bounds.each |bound| {
22742274
debug!("tc = %s, bound = %?", tc.to_str(), bound);
22752275
tc = tc - match bound {
2276-
BoundCopy => TypeContents::nonimplicitly_copyable(cx),
2276+
BoundCopy => TypeContents::noncopyable(cx),
22772277
BoundStatic => TypeContents::nonstatic(cx),
22782278
BoundOwned => TypeContents::nonowned(cx),
22792279
BoundConst => TypeContents::nonconst(cx),

0 commit comments

Comments
 (0)