1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137
|
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:17:12
|
LL | x: 1,
| ^
| |
| expected `f32`, found integer
| help: use a float literal: `1.0`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:20:12
|
LL | y: 2,
| ^
| |
| expected `f32`, found integer
| help: use a float literal: `2.0`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:26:12
|
LL | x: 3,
| ^
| |
| expected `f32`, found integer
| help: use a float literal: `3.0`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:29:12
|
LL | y: 4,
| ^
| |
| expected `f32`, found integer
| help: use a float literal: `4.0`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:35:12
|
LL | x: 5,
| ^
| |
| expected `f32`, found integer
| help: use a float literal: `5.0`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:42:12
|
LL | x: 7,
| ^
| |
| expected `f32`, found integer
| help: use a float literal: `7.0`
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/structure-constructor-type-mismatch.rs:48:15
|
LL | let pt3 = PointF::<i32> {
| ^^^^^^------- help: remove these generics
| |
| expected 0 generic arguments
|
note: type alias defined here, with 0 generic parameters
--> $DIR/structure-constructor-type-mismatch.rs:6:6
|
LL | type PointF = Point<f32>;
| ^^^^^^
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:49:12
|
LL | x: 9,
| ^
| |
| expected `f32`, found integer
| help: use a float literal: `9.0`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:50:12
|
LL | y: 10,
| ^^
| |
| expected `f32`, found integer
| help: use a float literal: `10.0`
error[E0107]: type alias takes 0 generic arguments but 1 generic argument was supplied
--> $DIR/structure-constructor-type-mismatch.rs:54:9
|
LL | PointF::<u32> { .. } => {}
| ^^^^^^------- help: remove these generics
| |
| expected 0 generic arguments
|
note: type alias defined here, with 0 generic parameters
--> $DIR/structure-constructor-type-mismatch.rs:6:6
|
LL | type PointF = Point<f32>;
| ^^^^^^
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:54:9
|
LL | match (Point { x: 1, y: 2 }) {
| ---------------------- this expression has type `Point<{integer}>`
LL | PointF::<u32> { .. } => {}
| ^^^^^^^^^^^^^^^^^^^^ expected `Point<{integer}>`, found `Point<f32>`
|
= note: expected struct `Point<{integer}>`
found struct `Point<f32>`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:59:9
|
LL | match (Point { x: 1, y: 2 }) {
| ---------------------- this expression has type `Point<{integer}>`
LL | PointF { .. } => {}
| ^^^^^^^^^^^^^ expected `Point<{integer}>`, found `Point<f32>`
|
= note: expected struct `Point<{integer}>`
found struct `Point<f32>`
error[E0308]: mismatched types
--> $DIR/structure-constructor-type-mismatch.rs:67:9
|
LL | match (Pair { x: 1, y: 2 }) {
| --------------------- this expression has type `Pair<{integer}, {integer}>`
LL | PairF::<u32> { .. } => {}
| ^^^^^^^^^^^^^^^^^^^ expected `Pair<{integer}, {integer}>`, found `Pair<f32, u32>`
|
= note: expected struct `Pair<{integer}, {integer}>`
found struct `Pair<f32, u32>`
error: aborting due to 13 previous errors
Some errors have detailed explanations: E0107, E0308.
For more information about an error, try `rustc --explain E0107`.
|