2024-10-04 09:10:28 -05:00
|
|
|
error[E0782]: expected a type, found a trait
|
2024-01-20 02:41:56 -06:00
|
|
|
--> $DIR/issue-116434-2021.rs:5:17
|
|
|
|
|
|
|
|
|
LL | fn foo() -> Clone;
|
2024-10-04 09:10:28 -05:00
|
|
|
| ^^^^^
|
2024-01-20 02:41:56 -06:00
|
|
|
|
|
2024-10-04 09:10:28 -05:00
|
|
|
help: `Clone` is dyn-incompatible, use `impl Clone` to return an opaque type, as long as you return a single underlying type
|
|
|
|
|
|
|
|
|
LL | fn foo() -> impl Clone;
|
|
|
|
| ++++
|
2024-02-14 14:42:32 -06:00
|
|
|
help: there is an associated type with the same name
|
|
|
|
|
|
|
|
|
LL | fn foo() -> Self::Clone;
|
|
|
|
| ++++++
|
2024-01-20 02:41:56 -06:00
|
|
|
|
2024-10-04 09:10:28 -05:00
|
|
|
error[E0782]: expected a type, found a trait
|
|
|
|
--> $DIR/issue-116434-2021.rs:15:20
|
2024-01-20 02:41:56 -06:00
|
|
|
|
|
|
|
|
LL | fn handle() -> DbHandle;
|
2024-10-04 09:10:28 -05:00
|
|
|
| ^^^^^^^^
|
2024-01-20 02:41:56 -06:00
|
|
|
|
|
2024-10-04 09:10:28 -05:00
|
|
|
help: `DbHandle` is dyn-incompatible, use `impl DbHandle` to return an opaque type, as long as you return a single underlying type
|
2024-01-20 02:41:56 -06:00
|
|
|
|
|
2024-10-04 09:10:28 -05:00
|
|
|
LL | fn handle() -> impl DbHandle;
|
|
|
|
| ++++
|
2024-02-14 14:42:32 -06:00
|
|
|
help: there is an associated type with the same name
|
|
|
|
|
|
|
|
|
LL | fn handle() -> Self::DbHandle;
|
|
|
|
| ++++++
|
2024-01-20 02:41:56 -06:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2024-10-04 09:10:28 -05:00
|
|
|
For more information about this error, try `rustc --explain E0782`.
|