2018-08-08 07:28:26 -05:00
|
|
|
error[E0308]: mismatched types
|
2019-05-28 13:46:13 -05:00
|
|
|
--> $DIR/cross-borrow-trait.rs:10:26
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | let _y: &dyn Trait = x;
|
2019-11-18 23:00:24 -06:00
|
|
|
| ---------- ^
|
|
|
|
| | |
|
2020-09-02 02:40:56 -05:00
|
|
|
| | expected `&dyn Trait`, found struct `Box`
|
2019-11-18 23:00:24 -06:00
|
|
|
| | help: consider borrowing here: `&x`
|
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected reference `&dyn Trait`
|
2020-09-02 02:40:56 -05:00
|
|
|
found struct `Box<dyn Trait>`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|