]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unspecified-self-in-trait-ref.rs
Auto merge of #75936 - sdroege:chunks-exact-construction-bounds-check, r=nagisa
[rust.git] / src / test / ui / unspecified-self-in-trait-ref.rs
1 pub trait Foo<A=Self> {
2     fn foo(&self);
3 }
4
5 pub trait Bar<X=usize, A=Self> {
6     fn foo(&self);
7 }
8
9 fn main() {
10     let a = Foo::lol();
11     //~^ ERROR no function or associated item named
12     let b = Foo::<_>::lol();
13     //~^ ERROR no function or associated item named
14     let c = Bar::lol();
15     //~^ ERROR no function or associated item named
16     let d = Bar::<usize, _>::lol();
17     //~^ ERROR no function or associated item named
18     let e = Bar::<usize>::lol();
19     //~^ ERROR must be explicitly specified
20 }