Skip to content

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

@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

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.E-mediumCall for participation: Medium difficulty. Experience needed to fix: Intermediate.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions