Skip to content

Commit 455b833

Browse files
committed
---
yaml --- r: 92351 b: refs/heads/auto c: 36990df h: refs/heads/master i: 92349: 71b536f 92347: e04761f 92343: b6a9602 92335: c169ad6 92319: 9aa8064 92287: f97c3c3 v: v3
1 parent f237aef commit 455b833

File tree

3 files changed

+25
-2
lines changed

3 files changed

+25
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: e7fbc1f553062f59b127d8c48345da72918accb4
16+
refs/heads/auto: 36990dfa3fdaa571c283ae9c06a765d6ca45a8da
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/test/compile-fail/kindck-pod.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@
1010

1111
// Test which of the builtin types are considered POD.
1212

13+
#[feature(managed_boxes)];
14+
15+
use std::rc::Rc;
16+
1317
fn assert_pod<T:Pod>() { }
1418
trait Dummy { }
1519

@@ -71,8 +75,12 @@ fn test<'a,T,U:Pod>(_: &'a int) {
7175

7276
// structs containing non-POD are not ok
7377
assert_pod::<MyNonpodStruct>(); //~ ERROR does not fulfill `Pod`
78+
79+
// managed or ref counted types are not ok
80+
assert_pod::<@int>(); //~ ERROR does not fulfill `Pod`
81+
assert_pod::<Rc<int>>(); //~ ERROR does not fulfill `Pod`
7482
}
7583

76-
fn main() {
84+
pub fn main() {
7785
}
7886

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/* Any copyright is dedicated to the Public Domain.
2+
* http://creativecommons.org/publicdomain/zero/1.0/ */
3+
4+
// Tests that type parameters with the `Pod` are implicitly copyable.
5+
6+
#[allow(dead_code)];
7+
8+
fn can_copy_pod<T:Pod>(v: T) {
9+
let _a = v;
10+
let _b = v;
11+
}
12+
13+
pub fn main() {}
14+
15+

0 commit comments

Comments
 (0)