"This generic parameter must be used with a generic lifetime parameter" on RPIT with precise capturing #135152
Labels
A-impl-trait
Area: `impl Trait`. Universally / existentially quantified anonymous types with static dispatch.
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
T-types
Relevant to the types team, which will review and decide on the PR/issue.
I tried this code:
I expected to see this happen:
the code compiles, since
param
gets used by all thechildren
Or, if the code actually violates ownership rules, get a clearer error message.
Instead, this happened:
compiler complains with "This generic parameter must be used with a generic lifetime parameter"
I've tried the following solutions:
'p
, like this:And still got the same bizarre error.
Meta
also present on latest stable (1.83.0), beta (1.84.0-beta.6), and nightly (2025-01-05)
Backtrace
The text was updated successfully, but these errors were encountered: