about summary refs log tree commit diff
path: root/tests/ui/methods/rigid-alias-bound-is-not-inherent-2.rs
blob: 8363ec1b3fb549e190d2d48e802cf14aa5a371da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// 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() {}