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