6 type PointF = Point<f32>;
13 type PairF<U> = Pair<f32,U>;
18 //~^ ERROR mismatched types
19 //~| expected `f32`, found integer
21 //~^ ERROR mismatched types
22 //~| expected `f32`, found integer
25 let pt2 = Point::<f32> {
27 //~^ ERROR mismatched types
28 //~| expected `f32`, found integer
30 //~^ ERROR mismatched types
31 //~| expected `f32`, found integer
36 //~^ ERROR mismatched types
37 //~| expected `f32`, found integer
41 let pair2 = PairF::<i32> {
43 //~^ ERROR mismatched types
44 //~| expected `f32`, found integer
48 let pt3 = PointF::<i32> { //~ ERROR this type alias takes 0 generic arguments but 1 generic argument
49 x: 9, //~ ERROR mismatched types
50 y: 10, //~ ERROR mismatched types
53 match (Point { x: 1, y: 2 }) {
54 PointF::<u32> { .. } => {} //~ ERROR this type alias takes 0 generic arguments but 1 generic argument
55 //~^ ERROR mismatched types
58 match (Point { x: 1, y: 2 }) {
59 PointF { .. } => {} //~ ERROR mismatched types
62 match (Point { x: 1.0, y: 2.0 }) {
63 PointF { .. } => {} // ok
66 match (Pair { x: 1, y: 2 }) {
67 PairF::<u32> { .. } => {} //~ ERROR mismatched types
70 match (Pair { x: 1.0, y: 2 }) {
71 PairF::<u32> { .. } => {} // ok