15 lines
637 B
Plaintext
15 lines
637 B
Plaintext
|
error[E0308]: mismatched types
|
||
|
--> $DIR/higher-ranked-upcasting-ok.rs:17:5
|
||
|
|
|
||
|
LL | fn ok(x: &dyn for<'a, 'b> Subtrait<'a, 'b>) -> &dyn for<'a> Supertrait<'a, 'a> {
|
||
|
| ------------------------------- expected `&dyn for<'a> Supertrait<'a, 'a>` because of return type
|
||
|
LL | x
|
||
|
| ^ expected trait `Supertrait`, found trait `Subtrait`
|
||
|
|
|
||
|
= note: expected reference `&dyn for<'a> Supertrait<'a, 'a>`
|
||
|
found reference `&dyn for<'a, 'b> Subtrait<'a, 'b>`
|
||
|
|
||
|
error: aborting due to 1 previous error
|
||
|
|
||
|
For more information about this error, try `rustc --explain E0308`.
|