fork/rust
git clone https://git.julia.blue/fork/rust
4560ea788cb
1.39.0
1error[E0308]: mismatched types 2 --> $DIR/coerce-expect-unsized-ascribed.rs:9:13 3 | 4LL | let _ = box { [1, 2, 3] }: Box<[i32]>; 5 | ^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements 6 | 7 = note: expected type `std::boxed::Box<[i32]>` 8 found type `std::boxed::Box<[i32; 3]>` 9 10error[E0308]: mismatched types 11 --> $DIR/coerce-expect-unsized-ascribed.rs:10:13 12 | 13LL | let _ = box if true { [1, 2, 3] } else { [1, 3, 4] }: Box<[i32]>; 14 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements 15 | 16 = note: expected type `std::boxed::Box<[i32]>` 17 found type `std::boxed::Box<[i32; 3]>` 18 19error[E0308]: mismatched types 20 --> $DIR/coerce-expect-unsized-ascribed.rs:11:13 21 | 22LL | let _ = box match true { true => [1, 2, 3], false => [1, 3, 4] }: Box<[i32]>; 23 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements 24 | 25 = note: expected type `std::boxed::Box<[i32]>` 26 found type `std::boxed::Box<[i32; 3]>` 27 28error[E0308]: mismatched types 29 --> $DIR/coerce-expect-unsized-ascribed.rs:13:13 30 | 31LL | let _ = box { |x| (x as u8) }: Box<dyn Fn(i32) -> _>; 32 | ^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure 33 | 34 = note: expected type `std::boxed::Box<dyn std::ops::Fn(i32) -> u8>` 35 found type `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:13:19: 13:32]>` 36 37error[E0308]: mismatched types 38 --> $DIR/coerce-expect-unsized-ascribed.rs:14:13 39 | 40LL | let _ = box if true { false } else { true }: Box<dyn Debug>; 41 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool 42 | 43 = note: expected type `std::boxed::Box<dyn std::fmt::Debug>` 44 found type `std::boxed::Box<bool>` 45 46error[E0308]: mismatched types 47 --> $DIR/coerce-expect-unsized-ascribed.rs:15:13 48 | 49LL | let _ = box match true { true => 'a', false => 'b' }: Box<dyn Debug>; 50 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char 51 | 52 = note: expected type `std::boxed::Box<dyn std::fmt::Debug>` 53 found type `std::boxed::Box<char>` 54 55error[E0308]: mismatched types 56 --> $DIR/coerce-expect-unsized-ascribed.rs:17:13 57 | 58LL | let _ = &{ [1, 2, 3] }: &[i32]; 59 | ^^^^^^^^^^^^^^ expected slice, found array of 3 elements 60 | 61 = note: expected type `&[i32]` 62 found type `&[i32; 3]` 63 64error[E0308]: mismatched types 65 --> $DIR/coerce-expect-unsized-ascribed.rs:18:13 66 | 67LL | let _ = &if true { [1, 2, 3] } else { [1, 3, 4] }: &[i32]; 68 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements 69 | 70 = note: expected type `&[i32]` 71 found type `&[i32; 3]` 72 73error[E0308]: mismatched types 74 --> $DIR/coerce-expect-unsized-ascribed.rs:19:13 75 | 76LL | let _ = &match true { true => [1, 2, 3], false => [1, 3, 4] }: &[i32]; 77 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements 78 | 79 = note: expected type `&[i32]` 80 found type `&[i32; 3]` 81 82error[E0308]: mismatched types 83 --> $DIR/coerce-expect-unsized-ascribed.rs:21:13 84 | 85LL | let _ = &{ |x| (x as u8) }: &dyn Fn(i32) -> _; 86 | ^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure 87 | 88 = note: expected type `&dyn std::ops::Fn(i32) -> u8` 89 found type `&[closure@$DIR/coerce-expect-unsized-ascribed.rs:21:16: 21:29]` 90 91error[E0308]: mismatched types 92 --> $DIR/coerce-expect-unsized-ascribed.rs:22:13 93 | 94LL | let _ = &if true { false } else { true }: &dyn Debug; 95 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found bool 96 | 97 = note: expected type `&dyn std::fmt::Debug` 98 found type `&bool` 99 100error[E0308]: mismatched types 101 --> $DIR/coerce-expect-unsized-ascribed.rs:23:13 102 | 103LL | let _ = &match true { true => 'a', false => 'b' }: &dyn Debug; 104 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::fmt::Debug, found char 105 | 106 = note: expected type `&dyn std::fmt::Debug` 107 found type `&char` 108 109error[E0308]: mismatched types 110 --> $DIR/coerce-expect-unsized-ascribed.rs:25:13 111 | 112LL | let _ = Box::new([1, 2, 3]): Box<[i32]>; 113 | ^^^^^^^^^^^^^^^^^^^ expected slice, found array of 3 elements 114 | 115 = note: expected type `std::boxed::Box<[i32]>` 116 found type `std::boxed::Box<[i32; 3]>` 117 118error[E0308]: mismatched types 119 --> $DIR/coerce-expect-unsized-ascribed.rs:26:13 120 | 121LL | let _ = Box::new(|x| (x as u8)): Box<dyn Fn(i32) -> _>; 122 | ^^^^^^^^^^^^^^^^^^^^^^^ expected trait std::ops::Fn, found closure 123 | 124 = note: expected type `std::boxed::Box<dyn std::ops::Fn(i32) -> _>` 125 found type `std::boxed::Box<[closure@$DIR/coerce-expect-unsized-ascribed.rs:26:22: 26:35]>` 126 127error: aborting due to 14 previous errors 128 129For more information about this error, try `rustc --explain E0308`.