about summary refs log tree commit diff
path: root/tests/ui/use/unused-trait-with-method-err.rs
blob: 37684e1bf81e9f2715b695bcc5464acd0f686bc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Test that we don't issue an unused import warning when there's
// a method lookup error and that trait was possibly applicable.

use foo::Bar;

mod foo {
    pub trait Bar {
        fn uwu(&self) {}
    }
}

struct Foo;

fn main() {
    Foo.uwu();
    //~^ ERROR no method named `uwu` found for struct `Foo` in the current scope
}