rustc/tests/ui/derives/derive-hrtb-for-bare-fn-field-with-lifetime.rs
2024-07-31 08:40:13 +02:00

14 lines
271 B
Rust

//@ run-pass
// Issue #122622: `#[derive(Clone)]` should work for HRTB function type taking an associated type
#![allow(dead_code)]
trait SomeTrait {
type SomeType<'a>;
}
#[derive(Clone)]
struct Foo<T: SomeTrait> {
x: for<'a> fn(T::SomeType<'a>)
}
fn main() {}