2023-02-02 15:22:02 -06:00
|
|
|
error[E0308]: mismatched types
|
2023-11-21 06:58:01 -06:00
|
|
|
--> $DIR/alias-where-clause-isnt-supertrait.rs:26:5
|
2023-02-02 15:22:02 -06:00
|
|
|
|
|
|
|
|
LL | fn test(x: &dyn C) -> &dyn B {
|
|
|
|
| ------ expected `&dyn B` because of return type
|
|
|
|
LL | x
|
|
|
|
| ^ expected trait `B`, found trait `C`
|
|
|
|
|
|
|
|
|
= note: expected reference `&dyn B`
|
|
|
|
found reference `&dyn C`
|
|
|
|
|
2023-11-21 09:44:16 -06:00
|
|
|
error: aborting due to 1 previous error
|
2023-02-02 15:22:02 -06:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|