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