Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure async trait impls are async (or otherwise return an opaque type) #104592

Merged
merged 1 commit into from
Dec 15, 2022

Commits on Dec 15, 2022

  1. Ensure async trait impls are async (or otherwise return an opaque type)

    As a workaround for the full `#[refine]` semantics not being implemented
    yet, forbit returning a concrete future type like `Box<dyn Future>` or a
    manually implemented Future.
    
    `-> impl Future` is still permitted; while that can also cause
    accidental refinement, that's behind a different feature gate
    (`return_position_impl_trait_in_trait`) and that problem exists
    regardless of whether the trait method is async, so will have to be
    solved more generally.
    
    Fixes rust-lang#102745
    ComputerDruid committed Dec 15, 2022
    Configuration menu
    Copy the full SHA
    da98ef9 View commit details
    Browse the repository at this point in the history