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

Add 'async_trait lifetime to impl Trait arguments #201

Merged
merged 3 commits into from Jun 2, 2022
Merged

Commits on Jun 2, 2022

  1. Add regression test for issue 177

    Currently fails with:
    
        error[E0309]: the parameter type `impl FnMut(&'life1 str) + Send` may not live long enough
            --> tests/test.rs:1383:68
             |
        1383 |         async fn foo(&self, mut callback: impl FnMut(&str) + Send) {}
             |                                                                    ^^ ...so that the type `impl futures::Future<Output = ()>` will meet its required lifetime bounds
             |
        help: consider adding an explicit lifetime bound...
             |
        1383 |         async fn foo(&self, mut callback: impl FnMut(&str) + Send + 'async_trait) {}
             |                                                                   ++++++++++++++
    dtolnay committed Jun 2, 2022
    Configuration menu
    Copy the full SHA
    a263414 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    82d6990 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    1e2a850 View commit details
    Browse the repository at this point in the history