Skip to content

Commit b0c5f26

Browse files
committed
---
yaml --- r: 88665 b: refs/heads/snap-stage3 c: 36990df h: refs/heads/master i: 88663: 4ab4a48 v: v3
1 parent c663b6d commit b0c5f26

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
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: deeca5d586bfaa4aa60246f671a8d611d38f6248
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: e7fbc1f553062f59b127d8c48345da72918accb4
4+
refs/heads/snap-stage3: 36990dfa3fdaa571c283ae9c06a765d6ca45a8da
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/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)