diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2023-04-16 06:55:22 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-16 06:55:22 +0900 |
| commit | 724da5cf113588ad88aff69f83d7cf996bd63782 (patch) | |
| tree | 9519e589ac78a4e397d00d166964932bee9a2763 | |
| parent | 1c228d122fd65b8c5c271d50c2f6726cd897daf1 (diff) | |
| parent | 714c276b9ca780308eb461993edc57090ac507e7 (diff) | |
| download | rust-724da5cf113588ad88aff69f83d7cf996bd63782.tar.gz rust-724da5cf113588ad88aff69f83d7cf996bd63782.zip | |
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.
| -rw-r--r-- | tests/ui/generics/issue-79605.rs | 6 | ||||
| -rw-r--r-- | tests/ui/generics/issue-79605.stderr | 14 |
2 files changed, 20 insertions, 0 deletions
diff --git a/tests/ui/generics/issue-79605.rs b/tests/ui/generics/issue-79605.rs new file mode 100644 index 00000000000..6f4c31e57a3 --- /dev/null +++ b/tests/ui/generics/issue-79605.rs @@ -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() {} diff --git a/tests/ui/generics/issue-79605.stderr b/tests/ui/generics/issue-79605.stderr new file mode 100644 index 00000000000..c5584962dc9 --- /dev/null +++ b/tests/ui/generics/issue-79605.stderr @@ -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`. |
