diff options
Diffstat (limited to '')
-rw-r--r-- | src/test/ui/sized/coinductive-1.rs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/test/ui/sized/coinductive-1.rs b/src/test/ui/sized/coinductive-1.rs new file mode 100644 index 000000000..7bcd0f1fd --- /dev/null +++ b/src/test/ui/sized/coinductive-1.rs @@ -0,0 +1,14 @@ +// check-pass +struct Node<C: Trait<Self>>(C::Assoc); + +trait Trait<T> { + type Assoc; +} + +impl<T> Trait<T> for Vec<()> { + type Assoc = Vec<T>; +} + +fn main() { + let _ = Node::<Vec<()>>(Vec::new()); +} |