Skip to content

Commit f0ecdfb

Browse files
committed
Added case for when impl generic associated type has a where clause
1 parent fdf6c65 commit f0ecdfb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/test/ui/rfc1598-generic-associated-types/generic-associated-types-where.rs

+2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ use std::fmt::{Display, Debug};
2020
trait Foo {
2121
type Assoc where Self: Sized;
2222
type Assoc2<T> where T: Display;
23+
type Assoc3<T>;
2324
type WithDefault<T> where T: Debug = Iterator<Item=T>;
2425
type NoGenerics;
2526
}
@@ -29,6 +30,7 @@ struct Bar;
2930
impl Foo for Bar {
3031
type Assoc = usize;
3132
type Assoc2<T> = Vec<T>;
33+
type Assoc3<T> where T: Iterator = Vec<T>;
3234
type WithDefault<'a, T> = &'a Iterator<T>;
3335
//~^ ERROR undeclared lifetime
3436
type NoGenerics = ::std::cell::Cell<i32>;

0 commit comments

Comments
 (0)