Skip to content

downcast beta regression #44445

Closed
Closed
@est31

Description

@est31

The tests of the downcast crate version 0.9.0 fail on latest beta 1.21, while they work on stable. The error output (full log):

error[E0310]: the parameter type `X` may not live long enough
  --> examples/with_params.rs:11:1
   |
11 | downcast!(<X> Animal<X> where X: Debug);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = help: consider adding an explicit lifetime bound `X: 'static`...
note: ...so that the type `Animal<X> + 'static` will meet its required lifetime bounds
  --> examples/with_params.rs:11:1
   |
11 | downcast!(<X> Animal<X> where X: Debug);
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = note: this error originates in a macro outside of the current crate

cc @fkoep

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.relnotesMarks issues that should be documented in the release notes of the next release.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions