]> git.proxmox.com Git - rustc.git/blobdiff - src/test/auxiliary/xcrate_associated_type_defaults.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / auxiliary / xcrate_associated_type_defaults.rs
index 43852a4e793f363a6477cb8dc7df1caf906c2a65..6779438c67226783e1d63bf6095cb790be532578 100644 (file)
 
 #![feature(associated_type_defaults)]
 
-pub trait Foo {
-    type Input = usize;
-    fn bar(&self, _: Self::Input) {}
+pub trait Foo<T: Default + ToString> {
+    type Out: Default + ToString = T;
 }
 
-impl Foo for () {}
+impl Foo<u32> for () {
+}
+
+impl Foo<u64> for () {
+    type Out = bool;
+}