'Z' => {
param_bounds.builtin_bounds.add(ty::BoundSized);
}
+ 'P' => {
+ param_bounds.builtin_bounds.add(ty::BoundPod);
+ }
'I' => {
param_bounds.trait_bounds.push(@parse_trait_ref(st, |x,y| conv(x,y)));
}
'.' => {
return param_bounds;
}
- _ => {
- fail!("parse_bounds: bad bounds")
+ c => {
+ fail!("parse_bounds: bad bounds ('{}')", c)
}
}
}
--- /dev/null
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+// Tests that metadata serialization works for the `Pod` kind.
+
+#[crate_type="lib"];
+
+pub fn f<T:Pod>() {}
+
pub trait RequiresFreeze : Freeze { }
pub trait RequiresRequiresFreezeAndSend : RequiresFreeze + Send { }
+pub trait RequiresPod : Pod { }
extern mod trait_superkinds_in_metadata;
use trait_superkinds_in_metadata::{RequiresRequiresFreezeAndSend, RequiresFreeze};
+use trait_superkinds_in_metadata::{RequiresPod};
struct X<T>(T);
impl <T:Freeze+Send> RequiresRequiresFreezeAndSend for X<T> { }
+impl <T:Pod> RequiresPod for X<T> { }
+
fn main() { }
--- /dev/null
+// xfail-fast
+// aux-build:kinds_in_metadata.rs
+
+/* Any copyright is dedicated to the Public Domain.
+ * http://creativecommons.org/publicdomain/zero/1.0/ */
+
+// Tests that metadata serialization works for the `Pod` kind.
+
+extern mod kinds_in_metadata;
+
+use kinds_in_metadata::f;
+
+pub fn main() {
+ f::<int>();
+}
+