mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 19:47:38 +00:00
18 lines
334 B
Rust
18 lines
334 B
Rust
// 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
|
|
}
|