rust/tests/ui/methods/rigid-alias-bound-is-not-inherent-2.rs

18 lines
339 B
Rust

// Regression test for <github.com/rust-lang/rust/issues/145185>.
mod module {
pub trait Trait {
fn method(&self);
}
}
// Note that we do not import Trait
use std::ops::Deref;
fn foo(x: impl Deref<Target: module::Trait>) {
x.method();
//~^ ERROR no method named `method` found for type parameter
}
fn main() {}