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