File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
src/test/ui/rfc1598-generic-associated-types Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 14
14
//FIXME(#44265): "lifetime parameters are not allowed on this type" errors will be addressed in a
15
15
//follow-up PR
16
16
17
- // A Collection trait and collection families.
18
- // Based on http://smallcultfollowing.com/babysteps/blog/2016/11/03/associated-type-constructors-part-2-family-traits/
17
+ // A Collection trait and collection families. Based on
18
+ // http://smallcultfollowing.com/babysteps/blog/2016/11/03/
19
+ // associated-type-constructors-part-2-family-traits/
19
20
20
21
trait Collection < T > {
21
22
fn empty ( ) -> Self ;
@@ -25,7 +26,8 @@ trait Collection<T> {
25
26
type Iter < ' iter > : Iterator < Item =& ' iter T > ;
26
27
type Family : CollectionFamily ;
27
28
// Test associated type defaults with parameters
28
- type Sibling < U > : Collection < U > = <<Self as Collection < T > >:: Family as CollectionFamily >:: Member < U > ;
29
+ type Sibling < U > : Collection < U > = <<Self as Collection < T > >:: Family as CollectionFamily >::
30
+ Member < U > ;
29
31
//~^ ERROR type parameters are not allowed on this type [E0109]
30
32
}
31
33
@@ -82,4 +84,4 @@ fn use_floatify() {
82
84
println ! ( "{}" , c. iterate( ) . next( ) ) ;
83
85
}
84
86
85
- fn main ( ) { }
87
+ fn main ( ) { }
You can’t perform that action at this time.
0 commit comments