]> git.lizzy.rs Git - rust.git/blob - src/test/ui/impl-trait/object-unsafe-trait-in-return-position-impl-trait.stderr
Rollup merge of #92917 - jackh726:issue-91762-2, r=nikomatsakis
[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    |             ------------------ the expected opaque type
6 ...
7 LL |     B
8    |     ^ expected struct `A`, found struct `B`
9    |
10    = note: expected opaque type `impl NotObjectSafe`
11                    found struct `B`
12
13 error[E0308]: mismatched types
14   --> $DIR/object-unsafe-trait-in-return-position-impl-trait.rs:43:5
15    |
16 LL | fn cat() -> impl ObjectSafe {
17    |             --------------- the expected opaque type
18 ...
19 LL |     B
20    |     ^ expected struct `A`, found struct `B`
21    |
22    = note: expected opaque type `impl ObjectSafe`
23                    found struct `B`
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0308`.