mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-17 19:14:16 +00:00
18 lines
270 B
Rust
18 lines
270 B
Rust
//@ 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);
|
|
}
|