]> git.lizzy.rs Git - rust.git/commitdiff
Added case for when impl generic associated type has a where clause
authorSunjay Varma <varma.sunjay@gmail.com>
Wed, 29 Nov 2017 19:11:41 +0000 (14:11 -0500)
committerSunjay Varma <varma.sunjay@gmail.com>
Fri, 1 Dec 2017 06:26:29 +0000 (01:26 -0500)
src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs

index af580aeccf7c60f09169b5f81578a1a4c6c9cb68..eec061bc96ba42b4419ff146d3acc423fbe367c8 100644 (file)
@@ -20,6 +20,7 @@
 trait Foo {
     type Assoc where Self: Sized;
     type Assoc2<T> where T: Display;
+    type Assoc3<T>;
     type WithDefault<T> where T: Debug = Iterator<Item=T>;
     type NoGenerics;
 }
@@ -29,6 +30,7 @@ trait Foo {
 impl Foo for Bar {
     type Assoc = usize;
     type Assoc2<T> = Vec<T>;
+    type Assoc3<T> where T: Iterator = Vec<T>;
     type WithDefault<'a, T> = &'a Iterator<T>;
     //~^ ERROR undeclared lifetime
     type NoGenerics = ::std::cell::Cell<i32>;