@@ -58,83 +58,80 @@ mod a {
58
58
}
59
59
60
60
fn this_crate ( ) {
61
- let a = a:: A ( ( ) ) ; //~ ERROR: cannot invoke tuple struct constructor
62
- let b = a:: B ( 2 ) ; //~ ERROR: cannot invoke tuple struct constructor
63
- let c = a:: C ( 2 , 3 ) ; //~ ERROR: cannot invoke tuple struct constructor
61
+ let a = a:: A ( ( ) ) ; //~ ERROR tuple struct `A` is private
62
+ let b = a:: B ( 2 ) ; //~ ERROR tuple struct `B` is private
63
+ let c = a:: C ( 2 , 3 ) ; //~ ERROR tuple struct `C` is private
64
64
let d = a:: D ( 4 ) ;
65
65
66
- let a:: A ( ( ) ) = a; //~ ERROR: field `0` of struct `a::A` is private
67
- let a:: A ( _) = a;
68
- match a { a:: A ( ( ) ) => { } } //~ ERROR: field `0` of struct `a::A` is private
69
- match a { a:: A ( _) => { } }
70
-
71
- let a:: B ( _) = b;
72
- let a:: B ( _b) = b; //~ ERROR: field `0` of struct `a::B` is private
73
- match b { a:: B ( _) => { } }
74
- match b { a:: B ( _b) => { } } //~ ERROR: field `0` of struct `a::B` is private
75
- match b { a:: B ( 1 ) => { } a:: B ( _) => { } } //~ ERROR: field `0` of struct `a::B` is private
76
-
77
- let a:: C ( _, _) = c;
78
- let a:: C ( _a, _) = c;
79
- let a:: C ( _, _b) = c; //~ ERROR: field `1` of struct `a::C` is private
80
- let a:: C ( _a, _b) = c; //~ ERROR: field `1` of struct `a::C` is private
81
- match c { a:: C ( _, _) => { } }
82
- match c { a:: C ( _a, _) => { } }
83
- match c { a:: C ( _, _b) => { } } //~ ERROR: field `1` of struct `a::C` is private
84
- match c { a:: C ( _a, _b) => { } } //~ ERROR: field `1` of struct `a::C` is private
66
+ let a:: A ( ( ) ) = a; //~ ERROR tuple struct `A` is private
67
+ let a:: A ( _) = a; //~ ERROR tuple struct `A` is private
68
+ match a { a:: A ( ( ) ) => { } } //~ ERROR tuple struct `A` is private
69
+ match a { a:: A ( _) => { } } //~ ERROR tuple struct `A` is private
70
+
71
+ let a:: B ( _) = b; //~ ERROR tuple struct `B` is private
72
+ let a:: B ( _b) = b; //~ ERROR tuple struct `B` is private
73
+ match b { a:: B ( _) => { } } //~ ERROR tuple struct `B` is private
74
+ match b { a:: B ( _b) => { } } //~ ERROR tuple struct `B` is private
75
+ match b { a:: B ( 1 ) => { } a:: B ( _) => { } } //~ ERROR tuple struct `B` is private
76
+ //~^ ERROR tuple struct `B` is private
77
+
78
+ let a:: C ( _, _) = c; //~ ERROR tuple struct `C` is private
79
+ let a:: C ( _a, _) = c; //~ ERROR tuple struct `C` is private
80
+ let a:: C ( _, _b) = c; //~ ERROR tuple struct `C` is private
81
+ let a:: C ( _a, _b) = c; //~ ERROR tuple struct `C` is private
82
+ match c { a:: C ( _, _) => { } } //~ ERROR tuple struct `C` is private
83
+ match c { a:: C ( _a, _) => { } } //~ ERROR tuple struct `C` is private
84
+ match c { a:: C ( _, _b) => { } } //~ ERROR tuple struct `C` is private
85
+ match c { a:: C ( _a, _b) => { } } //~ ERROR tuple struct `C` is private
85
86
86
87
let a:: D ( _) = d;
87
88
let a:: D ( _d) = d;
88
89
match d { a:: D ( _) => { } }
89
90
match d { a:: D ( _d) => { } }
90
91
match d { a:: D ( 1 ) => { } a:: D ( _) => { } }
91
92
92
- let a2 = a:: A ; //~ ERROR: cannot invoke tuple struct constructor
93
- let b2 = a:: B ; //~ ERROR: cannot invoke tuple struct constructor
94
- let c2 = a:: C ; //~ ERROR: cannot invoke tuple struct constructor
93
+ let a2 = a:: A ; //~ ERROR tuple struct `A` is private
94
+ let b2 = a:: B ; //~ ERROR tuple struct `B` is private
95
+ let c2 = a:: C ; //~ ERROR tuple struct `C` is private
95
96
let d2 = a:: D ;
96
97
}
97
98
98
99
fn xcrate ( ) {
99
- let a = other:: A ( ( ) ) ; //~ ERROR: cannot invoke tuple struct constructor
100
- let b = other:: B ( 2 ) ; //~ ERROR: cannot invoke tuple struct constructor
101
- let c = other:: C ( 2 , 3 ) ; //~ ERROR: cannot invoke tuple struct constructor
100
+ let a = other:: A ( ( ) ) ; //~ ERROR tuple struct `A` is private
101
+ let b = other:: B ( 2 ) ; //~ ERROR tuple struct `B` is private
102
+ let c = other:: C ( 2 , 3 ) ; //~ ERROR tuple struct `C` is private
102
103
let d = other:: D ( 4 ) ;
103
104
104
- let other:: A ( ( ) ) = a; //~ ERROR: field `0` of struct `other::A` is private
105
- let other:: A ( _) = a;
106
- match a { other:: A ( ( ) ) => { } }
107
- //~^ ERROR: field `0` of struct `other::A` is private
108
- match a { other:: A ( _) => { } }
109
-
110
- let other:: B ( _) = b;
111
- let other:: B ( _b) = b; //~ ERROR: field `0` of struct `other::B` is private
112
- match b { other:: B ( _) => { } }
113
- match b { other:: B ( _b) => { } }
114
- //~^ ERROR: field `0` of struct `other::B` is private
115
- match b { other:: B ( 1 ) => { } other:: B ( _) => { } }
116
- //~^ ERROR: field `0` of struct `other::B` is private
117
-
118
- let other:: C ( _, _) = c;
119
- let other:: C ( _a, _) = c;
120
- let other:: C ( _, _b) = c; //~ ERROR: field `1` of struct `other::C` is private
121
- let other:: C ( _a, _b) = c; //~ ERROR: field `1` of struct `other::C` is private
122
- match c { other:: C ( _, _) => { } }
123
- match c { other:: C ( _a, _) => { } }
124
- match c { other:: C ( _, _b) => { } }
125
- //~^ ERROR: field `1` of struct `other::C` is private
126
- match c { other:: C ( _a, _b) => { } }
127
- //~^ ERROR: field `1` of struct `other::C` is private
105
+ let other:: A ( ( ) ) = a; //~ ERROR tuple struct `A` is private
106
+ let other:: A ( _) = a; //~ ERROR tuple struct `A` is private
107
+ match a { other:: A ( ( ) ) => { } } //~ ERROR tuple struct `A` is private
108
+ match a { other:: A ( _) => { } } //~ ERROR tuple struct `A` is private
109
+
110
+ let other:: B ( _) = b; //~ ERROR tuple struct `B` is private
111
+ let other:: B ( _b) = b; //~ ERROR tuple struct `B` is private
112
+ match b { other:: B ( _) => { } } //~ ERROR tuple struct `B` is private
113
+ match b { other:: B ( _b) => { } } //~ ERROR tuple struct `B` is private
114
+ match b { other:: B ( 1 ) => { } other:: B ( _) => { } } //~ ERROR tuple struct `B` is private
115
+ //~^ ERROR tuple struct `B` is private
116
+
117
+ let other:: C ( _, _) = c; //~ ERROR tuple struct `C` is private
118
+ let other:: C ( _a, _) = c; //~ ERROR tuple struct `C` is private
119
+ let other:: C ( _, _b) = c; //~ ERROR tuple struct `C` is private
120
+ let other:: C ( _a, _b) = c; //~ ERROR tuple struct `C` is private
121
+ match c { other:: C ( _, _) => { } } //~ ERROR tuple struct `C` is private
122
+ match c { other:: C ( _a, _) => { } } //~ ERROR tuple struct `C` is private
123
+ match c { other:: C ( _, _b) => { } } //~ ERROR tuple struct `C` is private
124
+ match c { other:: C ( _a, _b) => { } } //~ ERROR tuple struct `C` is private
128
125
129
126
let other:: D ( _) = d;
130
127
let other:: D ( _d) = d;
131
128
match d { other:: D ( _) => { } }
132
129
match d { other:: D ( _d) => { } }
133
130
match d { other:: D ( 1 ) => { } other:: D ( _) => { } }
134
131
135
- let a2 = other:: A ; //~ ERROR: cannot invoke tuple struct constructor
136
- let b2 = other:: B ; //~ ERROR: cannot invoke tuple struct constructor
137
- let c2 = other:: C ; //~ ERROR: cannot invoke tuple struct constructor
132
+ let a2 = other:: A ; //~ ERROR tuple struct `A` is private
133
+ let b2 = other:: B ; //~ ERROR tuple struct `B` is private
134
+ let c2 = other:: C ; //~ ERROR tuple struct `C` is private
138
135
let d2 = other:: D ;
139
136
}
140
137
0 commit comments