]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
5ca01a593761cd54eb835bfb7d3df6f87d0810b6
[rust.git] / src / test / ui / impl-trait / object-unsafe-trait-in-return-position-impl-trait.stderr
1 error[E0308]: mismatched types
2   --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:36:5
3    |
4 LL | fn can() -> impl NotObjectSafe {
5    |             ------------------ expected `_` because of return type
6 ...
7 LL |     B
8    |     ^ expected struct `A`, found struct `B`
9
10 error[E0308]: mismatched types
11   --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:43:5
12    |
13 LL | fn cat() -> impl ObjectSafe {
14    |             --------------- expected `_` because of return type
15 ...
16 LL |     B
17    |     ^ expected struct `A`, found struct `B`
18
19 error: aborting due to 2 previous errors
20
21 For more information about this error, try `rustc --explain E0308`.