-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Open
Open
Copy link
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.
Description
// 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!() }`
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsD-incorrectDiagnostics: A diagnostic that is giving misleading or incorrect information.Diagnostics: A diagnostic that is giving misleading or incorrect information.D-papercutDiagnostics: An error or lint that needs small tweaks.Diagnostics: An error or lint that needs small tweaks.