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 note when FnPtr vs. FnDef impl trait #106665

Merged
merged 1 commit into from
Jan 14, 2023

Commits on Jan 14, 2023

  1. Add note when FnPtr vs. FnDef impl trait

    I encountered an instance where an `FnPtr` implemented a trait, but I was passing an `FnDef`. To
    the end user, there is really no way to differentiate each of them, but it is necessary to cast
    to the generic function in order to compile. It is thus useful to suggest `as` in the help note,
    (even if the Fn output implements the trait).
    JulianKnodt committed Jan 14, 2023
    Configuration menu
    Copy the full SHA
    2de9d67 View commit details
    Browse the repository at this point in the history