Skip to content

regression: mismatched types (invalid pointer cast for trait objects) #128889

Description

@BoxyUwU
[INFO] [stdout] error[E0308]: mismatched types
[INFO] [stdout]   --> src/untyped.rs:26:11
[INFO] [stdout]    |
[INFO] [stdout] 26 |         &*(self.pointer as *const dyn Fn(&ServiceProvider) -> T)
[INFO] [stdout]    |           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `()`, found `(&ServiceProvider,)`
[INFO] [stdout]    |
[INFO] [stdout]    = note: expected trait object `dyn Fn()`
[INFO] [stdout]               found trait object `dyn for<'a> Fn(&'a ServiceProvider) -> T`

#120248 (comment) I believe is accepted breakage? cc @WaffleLapkin

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-betaPerformance or correctness regression from stable to beta.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions