-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
RPITIT forces Self: Sized upon all other methods in a given trait. #115464
Copy link
Copy link
Closed
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-return_position_impl_trait_in_trait`#![feature(return_position_impl_trait_in_trait)]``#![feature(return_position_impl_trait_in_trait)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Metadata
Metadata
Assignees
Labels
C-bugCategory: This is a bug.Category: This is a bug.F-return_position_impl_trait_in_trait`#![feature(return_position_impl_trait_in_trait)]``#![feature(return_position_impl_trait_in_trait)]`T-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.requires-nightlyThis issue requires a nightly compiler in some way. When possible, use a F-* label instead.This issue requires a nightly compiler in some way. When possible, use a F-* label instead.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
Done
I tried this code:
I expected to see this happen: Successful compilation, since
fn_2does not require thatSelf: Sized, which is the case invec.Instead, this happened: I got the following compiler error:
Even though
fn_2does not require thatSelf: Sized. I'm not really sure that this is the intended behavior of this feature, since changingimpl OtherTraitto any concrete type would allow this to compile just fine.Meta
rustc --version --verbose: