rust/tests/ui/traits/vtable/issue-91807.rs

18 lines
268 B
Rust
Raw Normal View History

// check-pass
// incremental
struct Struct<T>(T);
impl<T> std::ops::Deref for Struct<T> {
type Target = dyn Fn(T);
fn deref(&self) -> &Self::Target {
unimplemented!()
}
}
fn main() {
let f = Struct(Default::default());
f(0);
f(0);
}