1 error[E0308]: mismatched types
2 --> $DIR/dst-bad-coercions.rs:14:17
5 | ^ expected &S, found *-ptr
7 = note: expected type `&S`
10 error[E0308]: mismatched types
11 --> $DIR/dst-bad-coercions.rs:15:21
13 LL | let y: &dyn T = x;
16 | expected &dyn T, found *-ptr
17 | help: consider borrowing here: `&x`
19 = note: expected type `&dyn T`
22 error[E0308]: mismatched types
23 --> $DIR/dst-bad-coercions.rs:19:17
26 | ^ expected &S, found *-ptr
28 = note: expected type `&S`
31 error[E0308]: mismatched types
32 --> $DIR/dst-bad-coercions.rs:20:21
34 LL | let y: &dyn T = x;
37 | expected &dyn T, found *-ptr
38 | help: consider borrowing here: `&x`
40 = note: expected type `&dyn T`
43 error[E0308]: mismatched types
44 --> $DIR/dst-bad-coercions.rs:23:25
46 LL | let x: &mut dyn T = &S;
47 | ^^ types differ in mutability
49 = note: expected type `&mut dyn T`
52 error[E0308]: mismatched types
53 --> $DIR/dst-bad-coercions.rs:24:25
55 LL | let x: *mut dyn T = &S;
56 | ^^ types differ in mutability
58 = note: expected type `*mut dyn T`
61 error[E0308]: mismatched types
62 --> $DIR/dst-bad-coercions.rs:25:21
64 LL | let x: *mut S = &S;
65 | ^^ types differ in mutability
67 = note: expected type `*mut S`
70 error: aborting due to 7 previous errors
72 For more information about this error, try `rustc --explain E0308`.