rust/tests/ui/traits/new-solver/lazy-nested-obligations-2.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

23 lines
328 B
Rust
Raw Normal View History

// compile-flags: -Ztrait-solver=next
2023-08-07 18:51:38 +00:00
// check-pass
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);
}