2023-12-14 06:11:28 -06:00
|
|
|
// compile-flags: -Znext-solver
|
2023-08-07 13:51:38 -05:00
|
|
|
// check-pass
|
2023-03-11 17:16:46 -06:00
|
|
|
|
|
|
|
pub trait With {
|
|
|
|
type F;
|
|
|
|
}
|
|
|
|
|
|
|
|
impl With for i32 {
|
|
|
|
type F = fn(&str);
|
|
|
|
}
|
|
|
|
|
|
|
|
fn f(_: &str) {}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
let _: V<i32> = V(f);
|
|
|
|
pub struct V<T: With>(<T as With>::F);
|
|
|
|
|
|
|
|
pub enum E3<T: With> {
|
|
|
|
Var(<T as With>::F),
|
|
|
|
}
|
|
|
|
let _: E3<i32> = E3::Var(f);
|
|
|
|
}
|