diff options
Diffstat (limited to 'src/test/ui/generic-associated-types/pointer_family.rs')
-rw-r--r-- | src/test/ui/generic-associated-types/pointer_family.rs | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/test/ui/generic-associated-types/pointer_family.rs b/src/test/ui/generic-associated-types/pointer_family.rs deleted file mode 100644 index 80827cd56..000000000 --- a/src/test/ui/generic-associated-types/pointer_family.rs +++ /dev/null @@ -1,34 +0,0 @@ -// check-pass - -use std::rc::Rc; -use std::sync::Arc; -use std::ops::Deref; - -trait PointerFamily { - type Pointer<T>: Deref<Target = T>; - fn new<T>(value: T) -> Self::Pointer<T>; -} - -struct ArcFamily; - -impl PointerFamily for ArcFamily { - type Pointer<T> = Arc<T>; - fn new<T>(value: T) -> Self::Pointer<T> { - Arc::new(value) - } -} - -struct RcFamily; - -impl PointerFamily for RcFamily { - type Pointer<T> = Rc<T>; - fn new<T>(value: T) -> Self::Pointer<T> { - Rc::new(value) - } -} - -struct Foo<P: PointerFamily> { - bar: P::Pointer<String>, -} - -fn main() {} |