Skip to content

Commit

Permalink
add UI test for #79605
Browse files Browse the repository at this point in the history
  • Loading branch information
SparkyPotato committed Apr 15, 2023
1 parent 67e273b commit 714c276
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/ui/generics/issue-79605.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
struct X<'a, T>(&'a T);

impl X<'_, _> {}
//~^ ERROR the placeholder `_` is not allowed within types on item signatures for implementations

fn main() {}
14 changes: 14 additions & 0 deletions tests/ui/generics/issue-79605.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
error[E0121]: the placeholder `_` is not allowed within types on item signatures for implementations
--> $DIR/issue-79605.rs:3:12
|
LL | impl X<'_, _> {}
| ^ not allowed in type signatures
|
help: use type parameters instead
|
LL | impl<T> X<'_, T> {}
| +++ ~

error: aborting due to previous error

For more information about this error, try `rustc --explain E0121`.

0 comments on commit 714c276

Please sign in to comment.