2020-01-15 17:49:54 -06:00
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:36:5
|
|
|
|
|
|
2022-01-26 08:47:03 -06:00
|
|
|
LL | fn can() -> impl NotObjectSafe {
|
2022-08-03 22:05:57 -05:00
|
|
|
| ------------------ expected `A` because of return type
|
2022-02-14 10:10:22 -06:00
|
|
|
...
|
2020-01-15 17:49:54 -06:00
|
|
|
LL | B
|
|
|
|
| ^ expected struct `A`, found struct `B`
|
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
|
|
|
--> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:43:5
|
|
|
|
|
|
2022-01-26 08:47:03 -06:00
|
|
|
LL | fn cat() -> impl ObjectSafe {
|
2022-08-03 22:05:57 -05:00
|
|
|
| --------------- expected `A` because of return type
|
2022-02-14 10:10:22 -06:00
|
|
|
...
|
2020-01-15 17:49:54 -06:00
|
|
|
LL | B
|
|
|
|
| ^ expected struct `A`, found struct `B`
|
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|