fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
4.3 KiB105 linesraw
1warning: trait objects without an explicit `dyn` are deprecated
2  --> $DIR/unspecified-self-in-trait-ref.rs:10:13
3   |
4LL |     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
10help: use `dyn`
11   |
12LL |     let a = <dyn Foo>::lol();
13   |             ++++    +
14
15error[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   |
18LL |     let a = Foo::lol();
19   |                  ^^^ function or associated item not found in `dyn Foo<_>`
20
21warning: trait objects without an explicit `dyn` are deprecated
22  --> $DIR/unspecified-self-in-trait-ref.rs:14:13
23   |
24LL |     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>
29help: use `dyn`
30   |
31LL |     let b = <dyn Foo::<_>>::lol();
32   |             ++++         +
33
34error[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   |
37LL |     let b = Foo::<_>::lol();
38   |                       ^^^ function or associated item not found in `dyn Foo<_>`
39
40warning: trait objects without an explicit `dyn` are deprecated
41  --> $DIR/unspecified-self-in-trait-ref.rs:18:13
42   |
43LL |     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>
48help: use `dyn`
49   |
50LL |     let c = <dyn Bar>::lol();
51   |             ++++    +
52
53error[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   |
56LL |     let c = Bar::lol();
57   |                  ^^^ function or associated item not found in `dyn Bar<_, _>`
58
59warning: trait objects without an explicit `dyn` are deprecated
60  --> $DIR/unspecified-self-in-trait-ref.rs:22:13
61   |
62LL |     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>
67help: use `dyn`
68   |
69LL |     let d = <dyn Bar::<usize, _>>::lol();
70   |             ++++                +
71
72error[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   |
75LL |     let d = Bar::<usize, _>::lol();
76   |                              ^^^ function or associated item not found in `dyn Bar<usize, _>`
77
78warning: trait objects without an explicit `dyn` are deprecated
79  --> $DIR/unspecified-self-in-trait-ref.rs:26:13
80   |
81LL |     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>
86help: use `dyn`
87   |
88LL |     let e = <dyn Bar::<usize>>::lol();
89   |             ++++             +
90
91error[E0393]: the type parameter `A` must be explicitly specified
92  --> $DIR/unspecified-self-in-trait-ref.rs:26:13
93   |
94LL | pub trait Bar<X=usize, A=Self> {
95   | ------------------------------ type parameter `A` must be specified for this
96...
97LL |     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
102error: aborting due to 5 previous errors; 5 warnings emitted
103
104Some errors have detailed explanations: E0393, E0599.
105For more information about an error, try `rustc --explain E0393`.