]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/unspecified-self-in-trait-ref.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / traits / unspecified-self-in-trait-ref.stderr
1 warning: trait objects without an explicit `dyn` are deprecated
2   --> $DIR/unspecified-self-in-trait-ref.rs:10:13
3    |
4 LL |     let a = Foo::lol();
5    |             ^^^
6    |
7    = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
8    = note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
9    = note: `#[warn(bare_trait_objects)]` on by default
10 help: use `dyn`
11    |
12 LL |     let a = <dyn Foo>::lol();
13    |             ++++    +
14
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
17    |
18 LL |     let a = Foo::lol();
19    |                  ^^^ function or associated item not found in `dyn Foo<_>`
20
21 warning: trait objects without an explicit `dyn` are deprecated
22   --> $DIR/unspecified-self-in-trait-ref.rs:14:13
23    |
24 LL |     let b = Foo::<_>::lol();
25    |             ^^^^^^^^
26    |
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>
29 help: use `dyn`
30    |
31 LL |     let b = <dyn Foo::<_>>::lol();
32    |             ++++         +
33
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
36    |
37 LL |     let b = Foo::<_>::lol();
38    |                       ^^^ function or associated item not found in `dyn Foo<_>`
39
40 warning: trait objects without an explicit `dyn` are deprecated
41   --> $DIR/unspecified-self-in-trait-ref.rs:18:13
42    |
43 LL |     let c = Bar::lol();
44    |             ^^^
45    |
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>
48 help: use `dyn`
49    |
50 LL |     let c = <dyn Bar>::lol();
51    |             ++++    +
52
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
55    |
56 LL |     let c = Bar::lol();
57    |                  ^^^ function or associated item not found in `dyn Bar<_, _>`
58
59 warning: trait objects without an explicit `dyn` are deprecated
60   --> $DIR/unspecified-self-in-trait-ref.rs:22:13
61    |
62 LL |     let d = Bar::<usize, _>::lol();
63    |             ^^^^^^^^^^^^^^^
64    |
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>
67 help: use `dyn`
68    |
69 LL |     let d = <dyn Bar::<usize, _>>::lol();
70    |             ++++                +
71
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
74    |
75 LL |     let d = Bar::<usize, _>::lol();
76    |                              ^^^ function or associated item not found in `dyn Bar<usize, _>`
77
78 warning: trait objects without an explicit `dyn` are deprecated
79   --> $DIR/unspecified-self-in-trait-ref.rs:26:13
80    |
81 LL |     let e = Bar::<usize>::lol();
82    |             ^^^^^^^^^^^^
83    |
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>
86 help: use `dyn`
87    |
88 LL |     let e = <dyn Bar::<usize>>::lol();
89    |             ++++             +
90
91 error[E0393]: the type parameter `A` must be explicitly specified
92   --> $DIR/unspecified-self-in-trait-ref.rs:26:13
93    |
94 LL | pub trait Bar<X=usize, A=Self> {
95    | ------------------------------ type parameter `A` must be specified for this
96 ...
97 LL |     let e = Bar::<usize>::lol();
98    |             ^^^^^^^^^^^^ missing reference to `A`
99    |
100    = note: because of the default `Self` reference, type parameters must be specified on object types
101
102 error: aborting due to 5 previous errors; 5 warnings emitted
103
104 Some errors have detailed explanations: E0393, E0599.
105 For more information about an error, try `rustc --explain E0393`.