Skip to content

Commit 714c276

Browse files
committed
add UI test for #79605
1 parent 67e273b commit 714c276

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

tests/ui/generics/issue-79605.rs

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
struct X<'a, T>(&'a T);
2+
3+
impl X<'_, _> {}
4+
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for implementations
5+
6+
fn main() {}

tests/ui/generics/issue-79605.stderr

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
2+
--> $DIR/issue-79605.rs:3:12
3+
|
4+
LL | impl X<'_, _> {}
5+
| ^ not allowed in type signatures
6+
|
7+
help: use type parameters instead
8+
|
9+
LL | impl<T> X<'_, T> {}
10+
| +++ ~
11+
12+
error: aborting due to previous error
13+
14+
For more information about this error, try `rustc --explain E0121`.

0 commit comments

Comments
 (0)