2018-08-08 07:28:26 -05:00
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/dst-bad-coercions.rs:14:17
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let y: &S = x;
|
2022-07-20 11:32:58 -05:00
|
|
|
| -- ^ expected `&S`, found `*const S`
|
2019-11-18 23:00:24 -06:00
|
|
|
| |
|
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected reference `&S`
|
|
|
|
found raw pointer `*const S`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-05-28 13:46:13 -05:00
|
|
|
--> $DIR/dst-bad-coercions.rs:15:21
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | let y: &dyn T = x;
|
2022-07-20 11:32:58 -05:00
|
|
|
| ------ ^ expected `&dyn T`, found `*const S`
|
2021-09-29 20:22:17 -05:00
|
|
|
| |
|
2019-11-18 23:00:24 -06:00
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected reference `&dyn T`
|
|
|
|
found raw pointer `*const S`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/dst-bad-coercions.rs:19:17
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let y: &S = x;
|
2022-07-20 11:32:58 -05:00
|
|
|
| -- ^ expected `&S`, found `*mut S`
|
2019-11-18 23:00:24 -06:00
|
|
|
| |
|
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected reference `&S`
|
|
|
|
found raw pointer `*mut S`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-05-28 13:46:13 -05:00
|
|
|
--> $DIR/dst-bad-coercions.rs:20:21
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | let y: &dyn T = x;
|
2022-07-20 11:32:58 -05:00
|
|
|
| ------ ^ expected `&dyn T`, found `*mut S`
|
2021-09-29 20:22:17 -05:00
|
|
|
| |
|
2019-11-18 23:00:24 -06:00
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected reference `&dyn T`
|
|
|
|
found raw pointer `*mut S`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-05-28 13:46:13 -05:00
|
|
|
--> $DIR/dst-bad-coercions.rs:23:25
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | let x: &mut dyn T = &S;
|
2019-11-18 23:00:24 -06:00
|
|
|
| ---------- ^^ types differ in mutability
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected mutable reference `&mut dyn T`
|
|
|
|
found reference `&S`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2019-05-28 13:46:13 -05:00
|
|
|
--> $DIR/dst-bad-coercions.rs:24:25
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-05-28 13:46:13 -05:00
|
|
|
LL | let x: *mut dyn T = &S;
|
2019-11-18 23:00:24 -06:00
|
|
|
| ---------- ^^ types differ in mutability
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected raw pointer `*mut dyn T`
|
|
|
|
found reference `&S`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error[E0308]: mismatched types
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/dst-bad-coercions.rs:25:21
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | let x: *mut S = &S;
|
2019-11-18 23:00:24 -06:00
|
|
|
| ------ ^^ types differ in mutability
|
|
|
|
| |
|
|
|
|
| expected due to this
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-11-13 16:16:56 -06:00
|
|
|
= note: expected raw pointer `*mut S`
|
|
|
|
found reference `&S`
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
|
|
error: aborting due to 7 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0308`.
|