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

APITIT get treated as ordinary params in "not all trait impls implemented" error #126395

Open
lcnr opened this issue Jun 13, 2024 · 1 comment
Open
Labels
A-diagnostics Area: Messages for errors, warnings, and lints D-incorrect Diagnostics: A diagnostic that is giving misleading or incorrect information. D-papercut Diagnostics: An error or lint that needs small tweaks.

Comments

@lcnr
Copy link
Contributor

lcnr commented Jun 13, 2024

// crate dep
pub trait Trait {
    fn foo(_: impl Sized);
    fn bar<T>(_: impl Sized);
}
// root
use dep::*;

struct Local;
impl Trait for Local {}

results in the following error:

error[E0046]: not all trait items implemented, missing: `foo`, `bar`
 --> src/main.rs:4:1
  |
4 | impl Trait for Local {}
  | ^^^^^^^^^^^^^^^^^^^^ missing `foo`, `bar` in implementation
  |
  = help: implement the missing item: `fn foo<impl Sized>(_: impl Sized) { todo!() }`
  = help: implement the missing item: `fn bar<T, impl Sized>(_: impl Sized) { todo!() }`

This wrongly includes the APITIT in the generic args. It should be

  = help: implement the missing item: `fn foo(_: impl Sized) { todo!() }`
  = help: implement the missing item: `fn bar<T>(_: impl Sized) { todo!() }`
@rustbot rustbot added the needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. label Jun 13, 2024
@veera-sivarajan
Copy link
Contributor

@rustbot label -needs-triage +A-diagnostics +D-incorrect +D-papercut

@rustbot rustbot added A-diagnostics Area: Messages for errors, warnings, and lints D-incorrect Diagnostics: A diagnostic that is giving misleading or incorrect information. D-papercut Diagnostics: An error or lint that needs small tweaks. and removed needs-triage This issue may need triage. Remove it if it has been sufficiently triaged. labels Jun 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints D-incorrect Diagnostics: A diagnostic that is giving misleading or incorrect information. D-papercut Diagnostics: An error or lint that needs small tweaks.
Projects
None yet
Development

No branches or pull requests

3 participants