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