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