2021-07-10 03:00:54 -05:00
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:10:13
|
|
|
|
|
|
|
|
|
LL | let a = Foo::lol();
|
2021-11-01 04:01:42 -05:00
|
|
|
| ^^^
|
2021-07-10 03:00:54 -05:00
|
|
|
|
|
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
2022-09-18 10:55:36 -05:00
|
|
|
= note: `#[warn(bare_trait_objects)]` on by default
|
2024-01-20 02:41:56 -06:00
|
|
|
help: if this is an object-safe trait, use `dyn`
|
2021-11-01 04:01:42 -05:00
|
|
|
|
|
|
|
|
LL | let a = <dyn Foo>::lol();
|
|
|
|
| ++++ +
|
2021-07-10 03:00:54 -05:00
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope
|
2018-12-07 12:15:36 -06:00
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:10:18
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let a = Foo::lol();
|
2019-03-10 18:20:15 -05:00
|
|
|
| ^^^ function or associated item not found in `dyn Foo<_>`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2021-07-10 03:00:54 -05:00
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:14:13
|
|
|
|
|
|
|
|
|
LL | let b = Foo::<_>::lol();
|
2021-11-01 04:01:42 -05:00
|
|
|
| ^^^^^^^^
|
2021-07-10 03:00:54 -05:00
|
|
|
|
|
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
2024-01-20 02:41:56 -06:00
|
|
|
help: if this is an object-safe trait, use `dyn`
|
2021-11-01 04:01:42 -05:00
|
|
|
|
|
|
|
|
LL | let b = <dyn Foo::<_>>::lol();
|
|
|
|
| ++++ +
|
2021-07-10 03:00:54 -05:00
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no function or associated item named `lol` found for trait object `dyn Foo<_>` in the current scope
|
2021-07-10 03:00:54 -05:00
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:14:23
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let b = Foo::<_>::lol();
|
2019-03-10 18:20:15 -05:00
|
|
|
| ^^^ function or associated item not found in `dyn Foo<_>`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2021-07-10 03:00:54 -05:00
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:18:13
|
|
|
|
|
|
|
|
|
LL | let c = Bar::lol();
|
2021-11-01 04:01:42 -05:00
|
|
|
| ^^^
|
2021-07-10 03:00:54 -05:00
|
|
|
|
|
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
2024-01-20 02:41:56 -06:00
|
|
|
help: if this is an object-safe trait, use `dyn`
|
2021-11-01 04:01:42 -05:00
|
|
|
|
|
|
|
|
LL | let c = <dyn Bar>::lol();
|
|
|
|
| ++++ +
|
2021-07-10 03:00:54 -05:00
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<_, _>` in the current scope
|
2021-07-10 03:00:54 -05:00
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:18:18
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let c = Bar::lol();
|
2019-03-10 18:20:15 -05:00
|
|
|
| ^^^ function or associated item not found in `dyn Bar<_, _>`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2021-07-10 03:00:54 -05:00
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:22:13
|
|
|
|
|
|
|
|
|
LL | let d = Bar::<usize, _>::lol();
|
2021-11-01 04:01:42 -05:00
|
|
|
| ^^^^^^^^^^^^^^^
|
2021-07-10 03:00:54 -05:00
|
|
|
|
|
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
2024-01-20 02:41:56 -06:00
|
|
|
help: if this is an object-safe trait, use `dyn`
|
2021-11-01 04:01:42 -05:00
|
|
|
|
|
|
|
|
LL | let d = <dyn Bar::<usize, _>>::lol();
|
|
|
|
| ++++ +
|
2021-07-10 03:00:54 -05:00
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no function or associated item named `lol` found for trait object `dyn Bar<usize, _>` in the current scope
|
2021-07-10 03:00:54 -05:00
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:22:30
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
LL | let d = Bar::<usize, _>::lol();
|
2019-03-10 18:20:15 -05:00
|
|
|
| ^^^ function or associated item not found in `dyn Bar<usize, _>`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2021-07-10 03:00:54 -05:00
|
|
|
warning: trait objects without an explicit `dyn` are deprecated
|
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:26:13
|
|
|
|
|
|
|
|
|
LL | let e = Bar::<usize>::lol();
|
2021-11-01 04:01:42 -05:00
|
|
|
| ^^^^^^^^^^^^
|
2021-07-10 03:00:54 -05:00
|
|
|
|
|
|
|
|
= warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
|
|
|
|
= note: for more information, see <https://doc.rust-lang.org/nightly/edition-guide/rust-2021/warnings-promoted-to-error.html>
|
2024-01-20 02:41:56 -06:00
|
|
|
help: if this is an object-safe trait, use `dyn`
|
2021-11-01 04:01:42 -05:00
|
|
|
|
|
|
|
|
LL | let e = <dyn Bar::<usize>>::lol();
|
|
|
|
| ++++ +
|
2021-07-10 03:00:54 -05:00
|
|
|
|
2018-08-08 07:28:26 -05:00
|
|
|
error[E0393]: the type parameter `A` must be explicitly specified
|
2021-07-10 03:00:54 -05:00
|
|
|
--> $DIR/unspecified-self-in-trait-ref.rs:26:13
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2022-02-13 09:27:59 -06:00
|
|
|
LL | pub trait Bar<X=usize, A=Self> {
|
|
|
|
| ------------------------------ type parameter `A` must be specified for this
|
2019-12-12 16:48:46 -06:00
|
|
|
...
|
2022-02-13 09:27:59 -06:00
|
|
|
LL | let e = Bar::<usize>::lol();
|
|
|
|
| ^^^^^^^^^^^^ missing reference to `A`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
|
= note: because of the default `Self` reference, type parameters must be specified on object types
|
|
|
|
|
2021-07-10 03:00:54 -05:00
|
|
|
error: aborting due to 5 previous errors; 5 warnings emitted
|
2018-08-08 07:28:26 -05:00
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0393, E0599.
|
2018-08-08 07:28:26 -05:00
|
|
|
For more information about an error, try `rustc --explain E0393`.
|