Skip to content

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

Merged
dtolnay merged 2 commits intomasterfrom
selfinblock
Jan 6, 2025
Merged

Omit Self: 'async_trait bound in impl when not needed by signature#284
dtolnay merged 2 commits intomasterfrom
selfinblock

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
@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