Skip to content

relaxed ?Sized bound getting implied by super trait warn #140962

Open
@lcnr

Description

@lcnr

the following code should lint that the ?Sized bound is unused:'

trait Proj {
    type Assoc: Clone + ?Sized;
}

fn foo<T: ?Sized + Clone>() {}

we imply Sized as it's a super trait of Clone, so the ?Sized bound does not do anything.

cc @davidtwco, related to sized_hierarchy migration stuff

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintsArea: Lints (warnings about flaws in source code) such as unused_mut.A-type-systemArea: Type systemC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions