Unsized types in required trait methods #134475
Labels
A-dyn-trait
Area: trait objects, vtable layout
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
needs-rfc
This change is large or controversial enough that it should have an RFC accepted before doing it.
T-lang
Relevant to the language team
T-types
Relevant to the types team, which will review and decide on the PR/issue.
Uh oh!
There was an error while loading. Please reload this page.
so this issue is a follow up for #134422 (closed as not planned) to suggest making a lint instead.
What the issue talked about
Rust does not check for
T: Sized
in required trait methodsThe above code compiles, even though
Self
andstr
are both?Sized
this makes the trait unimplementable
Produces:
For more information please see the RFC
Meta
for anyone who cares, here is
rustc --version --verbose
Here is the RFC
The text was updated successfully, but these errors were encountered: