Skip to content

Commit 724da5c

Browse files
authored
Rollup merge of #110350 - SparkyPotato:test-79605, r=cjgillot
Add a UI test for #79605 #79605 was fixed somewhere between December 2020 and now, but it did not have a UI test. This PR adds a UI test for the error.
2 parents 1c228d1 + 714c276 commit 724da5c

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)