1 error[E0308]: mismatched types
2 --> $DIR/dst-bad-coercions.rs:14:17
5 | -- ^ expected `&S`, found *-ptr
9 = note: expected reference `&S`
10 found raw pointer `*const S`
12 error[E0308]: mismatched types
13 --> $DIR/dst-bad-coercions.rs:15:21
15 LL | let y: &dyn T = x;
18 | | expected `&dyn T`, found *-ptr
19 | | help: consider borrowing here: `&x`
20 | expected due to this
22 = note: expected reference `&dyn T`
23 found raw pointer `*const S`
25 error[E0308]: mismatched types
26 --> $DIR/dst-bad-coercions.rs:19:17
29 | -- ^ expected `&S`, found *-ptr
31 | expected due to this
33 = note: expected reference `&S`
34 found raw pointer `*mut S`
36 error[E0308]: mismatched types
37 --> $DIR/dst-bad-coercions.rs:20:21
39 LL | let y: &dyn T = x;
42 | | expected `&dyn T`, found *-ptr
43 | | help: consider borrowing here: `&x`
44 | expected due to this
46 = note: expected reference `&dyn T`
47 found raw pointer `*mut S`
49 error[E0308]: mismatched types
50 --> $DIR/dst-bad-coercions.rs:23:25
52 LL | let x: &mut dyn T = &S;
53 | ---------- ^^ types differ in mutability
55 | expected due to this
57 = note: expected mutable reference `&mut dyn T`
60 error[E0308]: mismatched types
61 --> $DIR/dst-bad-coercions.rs:24:25
63 LL | let x: *mut dyn T = &S;
64 | ---------- ^^ types differ in mutability
66 | expected due to this
68 = note: expected raw pointer `*mut dyn T`
71 error[E0308]: mismatched types
72 --> $DIR/dst-bad-coercions.rs:25:21
74 LL | let x: *mut S = &S;
75 | ------ ^^ types differ in mutability
77 | expected due to this
79 = note: expected raw pointer `*mut S`
82 error: aborting due to 7 previous errors
84 For more information about this error, try `rustc --explain E0308`.