Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E0121 hint has duplicated type param with lifetime #79605

Closed
l4l opened this issue Dec 1, 2020 · 0 comments
Closed

E0121 hint has duplicated type param with lifetime #79605

l4l opened this issue Dec 1, 2020 · 0 comments
Labels
A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` C-bug Category: This is a bug. D-invalid-suggestion Diagnostics: A structured suggestion resulting in incorrect code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@l4l
Copy link
Contributor

l4l commented Dec 1, 2020

The following code:

struct X<'a, T>(&'a T);

impl X<'_, _> {}

leads to the following error (tested at playground with 1.48 stable & 1.50 nightly):

error[E0121]: the type placeholder `_` is not allowed within types on item signatures
 --> src/lib.rs:3:12
  |
3 | impl X<'_, _> {}
  |            ^ not allowed in type signatures
  |
help: use type parameters instead
  |
3 | impl X<'_, T, T> {}
  |          ^^^  ^

error: aborting due to previous error
@jonas-schievink jonas-schievink added A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` C-bug Category: This is a bug. D-invalid-suggestion Diagnostics: A structured suggestion resulting in incorrect code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 1, 2020
SparkyPotato added a commit to SparkyPotato/rust that referenced this issue Apr 15, 2023
aliemjay added a commit to aliemjay/rust that referenced this issue Apr 15, 2023
Add a UI test for rust-lang#79605

rust-lang#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.
aliemjay added a commit to aliemjay/rust that referenced this issue Apr 15, 2023
Add a UI test for rust-lang#79605

rust-lang#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.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this issue Apr 15, 2023
Add a UI test for rust-lang#79605

rust-lang#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.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Apr 15, 2023
Add a UI test for rust-lang#79605

rust-lang#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.
bors added a commit to rust-lang-ci/rust that referenced this issue Apr 16, 2023
Rollup of 8 pull requests

Successful merges:

 - rust-lang#110033 (Add 1.69.0 release notes)
 - rust-lang#110272 (fix: skip implied bounds if unconstrained lifetime exists)
 - rust-lang#110307 (Allow everyone to set the beta-nominated label)
 - rust-lang#110347 (Add intra-doc links to size_of_* functions)
 - rust-lang#110350 (Add a UI test for rust-lang#79605)
 - rust-lang#110356 (Fix `x test rust-installer` when `cargo` is set to a relative path)
 - rust-lang#110364 (remove redundant clones)
 - rust-lang#110366 (fix some clippy::complexity)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-suggestion-diagnostics Area: Suggestions generated by the compiler applied by `cargo fix` C-bug Category: This is a bug. D-invalid-suggestion Diagnostics: A structured suggestion resulting in incorrect code. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

3 participants