Skip to content

Commit cf5289d

Browse files
author
maple
committed
Add type-as-type-param test
1 parent 0d2d89b commit cf5289d

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
impl<Y<A, B, C>> Z for X<T> {} //~ ERROR: expected type parameter, found path `Y<A, B, C>`
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
error: expected type parameter, found path `Y<A, B, C>`
2+
--> $DIR/type-as-type-param.rs:1:6
3+
|
4+
LL | impl<Y<A, B, C>> Z for X<T> {}
5+
| ^^^^^^^^^^ expected type parameter, found path
6+
|
7+
help: you might have meant to bind a type parameter to a trait
8+
|
9+
LL | impl<T: Y<A, B, C>> Z for X<T> {}
10+
| ++
11+
help: alternatively, you might have meant to bind type parameters to trait `Y`
12+
|
13+
LL - impl<Y<A, B, C>> Z for X<T> {}
14+
LL + impl<A: Y, B: Y, C: Y> Z for X<T> {}
15+
|
16+
17+
error: aborting due to 1 previous error
18+

0 commit comments

Comments
 (0)