1 warning: trait objects without an explicit `dyn` are deprecated
2 --> $DIR/unspecified-self-in-trait-ref.rs:10:13
4 LL | let a = Foo::lol();
7 = note: `#[warn(bare_trait_objects)]` on by default
8 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
9 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
12 LL | let a = <dyn Foo>::lol();
15 error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope
16 --> $DIR/unspecified-self-in-trait-ref.rs:10:18
18 LL | let a = Foo::lol();
19 | ^^^ function or associated item not found in `dyn Foo<_>`
21 warning: trait objects without an explicit `dyn` are deprecated
22 --> $DIR/unspecified-self-in-trait-ref.rs:14:13
24 LL | let b = Foo::<_>::lol();
27 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
28 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
31 LL | let b = <dyn Foo::<_>>::lol();
34 error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope
35 --> $DIR/unspecified-self-in-trait-ref.rs:14:23
37 LL | let b = Foo::<_>::lol();
38 | ^^^ function or associated item not found in `dyn Foo<_>`
40 warning: trait objects without an explicit `dyn` are deprecated
41 --> $DIR/unspecified-self-in-trait-ref.rs:18:13
43 LL | let c = Bar::lol();
46 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
47 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
50 LL | let c = <dyn Bar>::lol();
53 error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<_, _>` in the current scope
54 --> $DIR/unspecified-self-in-trait-ref.rs:18:18
56 LL | let c = Bar::lol();
57 | ^^^ function or associated item not found in `dyn Bar<_, _>`
59 warning: trait objects without an explicit `dyn` are deprecated
60 --> $DIR/unspecified-self-in-trait-ref.rs:22:13
62 LL | let d = Bar::<usize, _>::lol();
65 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
66 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
69 LL | let d = <dyn Bar::<usize, _>>::lol();
72 error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<usize, _>` in the current scope
73 --> $DIR/unspecified-self-in-trait-ref.rs:22:30
75 LL | let d = Bar::<usize, _>::lol();
76 | ^^^ function or associated item not found in `dyn Bar<usize, _>`
78 warning: trait objects without an explicit `dyn` are deprecated
79 --> $DIR/unspecified-self-in-trait-ref.rs:26:13
81 LL | let e = Bar::<usize>::lol();
84 = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
85 = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
88 LL | let e = <dyn Bar::<usize>>::lol();
91 error[E0393]: the type parameter `A` must be explicitly specified
92 --> $DIR/unspecified-self-in-trait-ref.rs:26:13
94 LL | / pub trait Bar<X=usize, A=Self> {
97 | |_- type parameter `A` must be specified for this
99 LL | let e = Bar::<usize>::lol();
100 | ^^^^^^^^^^^^ missing reference to `A`
102 = note: because of the default `Self` reference, type parameters must be specified on object types
104 error: aborting due to 5 previous errors; 5 warnings emitted
106 Some errors have detailed explanations: E0393, E0599.
107 For more information about an error, try `rustc --explain E0393`.