error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:20:13 | LL | let a = Foo::lol(); | ^^^^^^^^ function or associated item not found in `dyn Foo<_>` error[E0599]: no function or associated item named `lol` found for type `dyn Foo<_>` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:22:13 | LL | let b = Foo::<_>::lol(); | ^^^^^^^^^^^^^ function or associated item not found in `dyn Foo<_>` error[E0599]: no function or associated item named `lol` found for type `dyn Bar<_, _>` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:24:13 | LL | let c = Bar::lol(); | ^^^^^^^^ function or associated item not found in `dyn Bar<_, _>` error[E0599]: no function or associated item named `lol` found for type `dyn Bar` in the current scope --> $DIR/unspecified-self-in-trait-ref.rs:26:13 | LL | let d = Bar::::lol(); | ^^^^^^^^^^^^^^^^^^^^ function or associated item not found in `dyn Bar` error[E0393]: the type parameter `A` must be explicitly specified --> $DIR/unspecified-self-in-trait-ref.rs:28:13 | LL | let e = Bar::::lol(); | ^^^^^^^^^^^^^^^^^ missing reference to `A` | = note: because of the default `Self` reference, type parameters must be specified on object types error: aborting due to 5 previous errors Some errors occurred: E0393, E0599. For more information about an error, try `rustc --explain E0393`.