Added case for when impl generic associated type has a where clause

This commit is contained in:
Sunjay Varma 2017-11-29 14:11:41 -05:00
parent fdf6c652ce
commit f0ecdfb1ab

View File

@ -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>;