This commit is contained in:
Esteban Küber 2020-01-19 19:22:15 -08:00
parent d72bcdb42c
commit 0eb29d1a44

View File

@ -1,20 +1,20 @@
error[E0038]: the trait `NotObjectSafe` cannot be made into an object
--> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:21:1
--> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:21:13
|
LL | fn foo() -> Self;
| --- associated function `foo` has no `self` parameter
...
LL | fn car() -> dyn NotObjectSafe {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
| ^^^^^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
error[E0038]: the trait `NotObjectSafe` cannot be made into an object
--> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:28:1
--> $DIR/object-unsafe-trait-in-return-position-dyn-trait.rs:28:13
|
LL | fn foo() -> Self;
| --- associated function `foo` has no `self` parameter
...
LL | fn cat() -> Box<dyn NotObjectSafe> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
| ^^^^^^^^^^^^^^^^^^^^^^ the trait `NotObjectSafe` cannot be made into an object
error: aborting due to 2 previous errors