fork/rust
git clone https://git.julia.blue/fork/rust
b8cedc00407
1.42.0
1error[E0308]: mismatched types 2 --> $DIR/dst-bad-coercions.rs:14:17 3 | 4LL | let y: &S = x; 5 | -- ^ expected `&S`, found *-ptr 6 | | 7 | expected due to this 8 | 9 = note: expected reference `&S` 10 found raw pointer `*const S` 11 12error[E0308]: mismatched types 13 --> $DIR/dst-bad-coercions.rs:15:21 14 | 15LL | let y: &dyn T = x; 16 | ------ ^ 17 | | | 18 | | expected `&dyn T`, found *-ptr 19 | | help: consider borrowing here: `&x` 20 | expected due to this 21 | 22 = note: expected reference `&dyn T` 23 found raw pointer `*const S` 24 25error[E0308]: mismatched types 26 --> $DIR/dst-bad-coercions.rs:19:17 27 | 28LL | let y: &S = x; 29 | -- ^ expected `&S`, found *-ptr 30 | | 31 | expected due to this 32 | 33 = note: expected reference `&S` 34 found raw pointer `*mut S` 35 36error[E0308]: mismatched types 37 --> $DIR/dst-bad-coercions.rs:20:21 38 | 39LL | let y: &dyn T = x; 40 | ------ ^ 41 | | | 42 | | expected `&dyn T`, found *-ptr 43 | | help: consider borrowing here: `&x` 44 | expected due to this 45 | 46 = note: expected reference `&dyn T` 47 found raw pointer `*mut S` 48 49error[E0308]: mismatched types 50 --> $DIR/dst-bad-coercions.rs:23:25 51 | 52LL | let x: &mut dyn T = &S; 53 | ---------- ^^ types differ in mutability 54 | | 55 | expected due to this 56 | 57 = note: expected mutable reference `&mut dyn T` 58 found reference `&S` 59 60error[E0308]: mismatched types 61 --> $DIR/dst-bad-coercions.rs:24:25 62 | 63LL | let x: *mut dyn T = &S; 64 | ---------- ^^ types differ in mutability 65 | | 66 | expected due to this 67 | 68 = note: expected raw pointer `*mut dyn T` 69 found reference `&S` 70 71error[E0308]: mismatched types 72 --> $DIR/dst-bad-coercions.rs:25:21 73 | 74LL | let x: *mut S = &S; 75 | ------ ^^ types differ in mutability 76 | | 77 | expected due to this 78 | 79 = note: expected raw pointer `*mut S` 80 found reference `&S` 81 82error: aborting due to 7 previous errors 83 84For more information about this error, try `rustc --explain E0308`.