about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSunjay Varma <varma.sunjay@gmail.com>2017-11-29 14:11:41 -0500
committerSunjay Varma <varma.sunjay@gmail.com>2017-12-01 01:26:29 -0500
commitf0ecdfb1aba426684e166494a811a03086e76721 (patch)
tree84c04fe6c79335fc792e376bcd9019d4206e18e0
parentfdf6c652cecdb09b28cd4701917b9857f7ce0cb7 (diff)
downloadrust-f0ecdfb1aba426684e166494a811a03086e76721.tar.gz
rust-f0ecdfb1aba426684e166494a811a03086e76721.zip
Added case for when impl generic associated type has a where clause
-rw-r--r--src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs
index af580aeccf7..eec061bc96b 100644
--- a/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs
+++ b/src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs
@@ -20,6 +20,7 @@ use std::fmt::{Display, Debug};
 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 @@ struct Bar;
 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>;