-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[BUG] Stable (warning): Async traits Self return requires type specification #113538
Copy link
Copy link
Closed
Closed
Copy link
Labels
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.Category: This is a bug.F-async_fn_in_traitStatic async fn in traitsStatic async fn in traitsrequires-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
A-async-awaitArea: Async & AwaitArea: Async & AwaitAsyncAwait-TriagedAsync-await issues that have been triaged during a working group meeting.Async-await issues that have been triaged during a working group meeting.C-bugCategory: This is a bug.Category: This is a bug.F-async_fn_in_traitStatic async fn in traitsStatic async fn in traitsrequires-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
When using the
#![feature(async_fn_in_trait)]flag, I stumbled upon a warning that I don't understand and assume to be a bug/missed implementation.If this is the intended behavior, could anyone please explain why?
This is simplified code that generates the warning:
But when adding a type restriction on self (in this case Sized) the warning does not appear anymore.
Meta
rustc --version --verbose: