about summary refs log tree commit diff
path: root/tests/ui/methods/dont-suggest-import-on-deref-err.rs
blob: c24ab7919824bcd41a70efaa9ffff26699ba1b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
use std::clone::Clone;
use std::ops::Deref;

#[derive(Clone)]
pub struct Foo {}

impl Deref for Foo {}
//~^ ERROR not all trait items implemented

pub fn main() {
    let f = Foo {};
    let _ = f.clone();
}