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

Generate trait bounds on associated types #408

Merged
merged 2 commits into from
Jan 8, 2025
Merged

Generate trait bounds on associated types #408

merged 2 commits into from
Jan 8, 2025

Conversation

dtolnay
Copy link
Owner

@dtolnay dtolnay commented Jan 8, 2025

Closes #405.

    error[E0599]: the method `as_display` exists for reference `&<T as FromStr>::Err`, but its trait bounds were not satisfied
       --> tests/test_generics.rs:178:13
        |
    178 |     #[error("couldn't parse entry: {0}")]
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&<T as FromStr>::Err` due to unsatisfied trait bounds
        |
        = note: the following trait bounds were not satisfied:
                `<T as FromStr>::Err: std::fmt::Display`
                which is required by `&<T as FromStr>::Err: AsDisplay<'_>`
@dtolnay dtolnay merged commit 6cd87bc into master Jan 8, 2025
20 checks passed
@dtolnay dtolnay deleted the assoctype branch January 8, 2025 19:45
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.

Move trait bounds to impl block of Error
1 participant