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

Omit Self: 'async_trait bound in impl when not needed by signature #284

Merged
merged 2 commits into from
Jan 6, 2025

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 6, 2025

Fixes #283.

    error[E0276]: impl has stricter requirements than trait
        --> tests/test.rs:1699:5
         |
    1692 |         async fn a();
         |         ------------- definition of `a` from trait
    ...
    1699 |     #[async_trait]
         |     ^^^^^^^^^^^^^^ impl has extra requirement `T: 'async_trait`
         |
         = note: this error originates in the attribute macro `async_trait` (in Nightly builds, run with -Z macro-backtrace for more info)
@dtolnay dtolnay merged commit 0c2e108 into master Jan 6, 2025
19 checks passed
@dtolnay dtolnay deleted the selfinblock branch January 6, 2025 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to call Self in blanket implementation
1 participant