Skip to content

Unused type params for trait impls cause weird errors about Sized #17567

Closed
@ben0x539

Description

@ben0x539
trait Tr {}
impl<T> Tr for () {}
fn main() {}
foo.rs:2:1: 2:21 error: the trait `core::kinds::Sized` is not implemented for the type `<generic #0>`
foo.rs:2 impl<T> Tr for () {}
         ^~~~~~~~~~~~~~~~~~~~
foo.rs:2:1: 2:21 note: the trait `core::kinds::Sized` must be implemented because it is required by `Tr`
foo.rs:2 impl<T> Tr for () {}
         ^~~~~~~~~~~~~~~~~~~~

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-DSTsArea: Dynamically-sized types (DSTs)A-diagnosticsArea: Messages for errors, warnings, and lintsI-compiletimeIssue: Problems and improvements with respect to compile times.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions