]> git.lizzy.rs Git - rust.git/blob - src/test/ui/unspecified-self-in-trait-ref.stderr
Rollup merge of #82259 - osa1:issue82156, r=petrochenkov
[rust.git] / src / test / ui / unspecified-self-in-trait-ref.stderr
1 error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope
2   --> $DIR/unspecified-self-in-trait-ref.rs:10:18
3    |
4 LL |     let a = Foo::lol();
5    |                  ^^^ function or associated item not found in `dyn Foo<_>`
6
7 error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope
8   --> $DIR/unspecified-self-in-trait-ref.rs:12:23
9    |
10 LL |     let b = Foo::<_>::lol();
11    |                       ^^^ function or associated item not found in `dyn Foo<_>`
12
13 error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<_, _>` in the current scope
14   --> $DIR/unspecified-self-in-trait-ref.rs:14:18
15    |
16 LL |     let c = Bar::lol();
17    |                  ^^^ function or associated item not found in `dyn Bar<_, _>`
18
19 error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<usize, _>` in the current scope
20   --> $DIR/unspecified-self-in-trait-ref.rs:16:30
21    |
22 LL |     let d = Bar::<usize, _>::lol();
23    |                              ^^^ function or associated item not found in `dyn Bar<usize, _>`
24
25 error[E0393]: the type parameter `A` must be explicitly specified
26   --> $DIR/unspecified-self-in-trait-ref.rs:18:13
27    |
28 LL | / pub trait Bar<X=usize, A=Self> {
29 LL | |     fn foo(&self);
30 LL | | }
31    | |_- type parameter `A` must be specified for this
32 ...
33 LL |       let e = Bar::<usize>::lol();
34    |               ^^^^^^^^^^^^^^^^^ missing reference to `A`
35    |
36    = note: because of the default `Self` reference, type parameters must be specified on object types
37
38 error: aborting due to 5 previous errors
39
40 Some errors have detailed explanations: E0393, E0599.
41 For more information about an error, try `rustc --explain E0393`.