Closed
Description
minimal repro:
#![allow(incomplete_features)]
#![feature(non_lifetime_binders)]
trait MyTrait1 {}
trait MyTrait2
where for <T: MyTrait1> ():
{
}
output:
error: lifetime bounds cannot be used in this context
--> src/lib.rs:7:19
|
7 | where for <T: MyTrait1> ():
| ^^^^^^^^
use case:
[playground]
weird example, i know. its difficult to construct a proper example that isn't overly complex
workaround:
add the bound to all call sites that require it (e.g. add
where Human: Consume<Food>
tofoo()
in the above example)
rustc:
1.76.0-nightly (2023-12-17 6a62871)