rust/tests/ui/use/unused-trait-with-method-err.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
334 B
Rust
Raw Normal View History

// 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
}