Update Tests · rust-lang/rust@62a104d

@@ -4,104 +4,86 @@ error: only foreign or `unsafe extern "C"` functions may be C-variadic

44

LL | fn f1_1(x: isize, ...) {}

55

| ^^^

667-

error: C-variadic function must be declared with at least one named argument

8-

--> $DIR/variadic-ffi-semantic-restrictions.rs:9:9

9-

|

10-

LL | fn f1_2(...) {}

11-

| ^^^

12-137

error: only foreign or `unsafe extern "C"` functions may be C-variadic

148

--> $DIR/variadic-ffi-semantic-restrictions.rs:9:9

159

|

1610

LL | fn f1_2(...) {}

1711

| ^^^

18121913

error: only foreign or `unsafe extern "C"` functions may be C-variadic

20-

--> $DIR/variadic-ffi-semantic-restrictions.rs:13:30

14+

--> $DIR/variadic-ffi-semantic-restrictions.rs:12:30

2115

|

2216

LL | extern "C" fn f2_1(x: isize, ...) {}

2317

| ^^^

241825-

error: C-variadic function must be declared with at least one named argument

26-

--> $DIR/variadic-ffi-semantic-restrictions.rs:16:20

27-

|

28-

LL | extern "C" fn f2_2(...) {}

29-

| ^^^

30-3119

error: only foreign or `unsafe extern "C"` functions may be C-variadic

32-

--> $DIR/variadic-ffi-semantic-restrictions.rs:16:20

20+

--> $DIR/variadic-ffi-semantic-restrictions.rs:15:20

3321

|

3422

LL | extern "C" fn f2_2(...) {}

3523

| ^^^

36243725

error: `...` must be the last argument of a C-variadic function

38-

--> $DIR/variadic-ffi-semantic-restrictions.rs:20:20

26+

--> $DIR/variadic-ffi-semantic-restrictions.rs:18:20

3927

|

4028

LL | extern "C" fn f2_3(..., x: isize) {}

4129

| ^^^

42304331

error: only foreign or `unsafe extern "C"` functions may be C-variadic

44-

--> $DIR/variadic-ffi-semantic-restrictions.rs:20:20

32+

--> $DIR/variadic-ffi-semantic-restrictions.rs:18:20

4533

|

4634

LL | extern "C" fn f2_3(..., x: isize) {}

4735

| ^^^

48364937

error: only foreign or `unsafe extern "C"` functions may be C-variadic

50-

--> $DIR/variadic-ffi-semantic-restrictions.rs:24:30

38+

--> $DIR/variadic-ffi-semantic-restrictions.rs:22:30

5139

|

5240

LL | extern "C" fn f3_1(x: isize, ...) {}

5341

| ^^^

544255-

error: C-variadic function must be declared with at least one named argument

56-

--> $DIR/variadic-ffi-semantic-restrictions.rs:27:20

57-

|

58-

LL | extern "C" fn f3_2(...) {}

59-

| ^^^

60-6143

error: only foreign or `unsafe extern "C"` functions may be C-variadic

62-

--> $DIR/variadic-ffi-semantic-restrictions.rs:27:20

44+

--> $DIR/variadic-ffi-semantic-restrictions.rs:25:20

6345

|

6446

LL | extern "C" fn f3_2(...) {}

6547

| ^^^

66486749

error: `...` must be the last argument of a C-variadic function

68-

--> $DIR/variadic-ffi-semantic-restrictions.rs:31:20

50+

--> $DIR/variadic-ffi-semantic-restrictions.rs:28:20

6951

|

7052

LL | extern "C" fn f3_3(..., x: isize) {}

7153

| ^^^

72547355

error: only foreign or `unsafe extern "C"` functions may be C-variadic

74-

--> $DIR/variadic-ffi-semantic-restrictions.rs:31:20

56+

--> $DIR/variadic-ffi-semantic-restrictions.rs:28:20

7557

|

7658

LL | extern "C" fn f3_3(..., x: isize) {}

7759

| ^^^

78607961

error: functions cannot be both `const` and C-variadic

80-

--> $DIR/variadic-ffi-semantic-restrictions.rs:35:1

62+

--> $DIR/variadic-ffi-semantic-restrictions.rs:32:1

8163

|

8264

LL | const unsafe extern "C" fn f4_1(x: isize, ...) {}

8365

| ^^^^^ `const` because of this ^^^ C-variadic because of this

84668567

error: functions cannot be both `const` and C-variadic

86-

--> $DIR/variadic-ffi-semantic-restrictions.rs:39:1

68+

--> $DIR/variadic-ffi-semantic-restrictions.rs:36:1

8769

|

8870

LL | const extern "C" fn f4_2(x: isize, ...) {}

8971

| ^^^^^ `const` because of this ^^^ C-variadic because of this

90729173

error: only foreign or `unsafe extern "C"` functions may be C-variadic

92-

--> $DIR/variadic-ffi-semantic-restrictions.rs:39:36

74+

--> $DIR/variadic-ffi-semantic-restrictions.rs:36:36

9375

|

9476

LL | const extern "C" fn f4_2(x: isize, ...) {}

9577

| ^^^

96789779

error: `...` must be the last argument of a C-variadic function

98-

--> $DIR/variadic-ffi-semantic-restrictions.rs:44:26

80+

--> $DIR/variadic-ffi-semantic-restrictions.rs:41:26

9981

|

10082

LL | const extern "C" fn f4_3(..., x: isize, ...) {}

10183

| ^^^

1028410385

error: functions cannot be both `const` and C-variadic

104-

--> $DIR/variadic-ffi-semantic-restrictions.rs:44:1

86+

--> $DIR/variadic-ffi-semantic-restrictions.rs:41:1

10587

|

10688

LL | const extern "C" fn f4_3(..., x: isize, ...) {}

10789

| ^^^^^ ^^^ ^^^ C-variadic because of this

@@ -110,163 +92,139 @@ LL | const extern "C" fn f4_3(..., x: isize, ...) {}

11092

| `const` because of this

1119311294

error: only foreign or `unsafe extern "C"` functions may be C-variadic

113-

--> $DIR/variadic-ffi-semantic-restrictions.rs:44:26

95+

--> $DIR/variadic-ffi-semantic-restrictions.rs:41:26

11496

|

11597

LL | const extern "C" fn f4_3(..., x: isize, ...) {}

11698

| ^^^ ^^^

11799118-

error: C-variadic function must be declared with at least one named argument

119-

--> $DIR/variadic-ffi-semantic-restrictions.rs:50:13

120-

|

121-

LL | fn e_f1(...);

122-

| ^^^

123-124100

error: `...` must be the last argument of a C-variadic function

125-

--> $DIR/variadic-ffi-semantic-restrictions.rs:52:13

101+

--> $DIR/variadic-ffi-semantic-restrictions.rs:47:13

126102

|

127103

LL | fn e_f2(..., x: isize);

128104

| ^^^

129105130106

error: only foreign or `unsafe extern "C"` functions may be C-variadic

131-

--> $DIR/variadic-ffi-semantic-restrictions.rs:59:23

107+

--> $DIR/variadic-ffi-semantic-restrictions.rs:54:23

132108

|

133109

LL | fn i_f1(x: isize, ...) {}

134110

| ^^^

135111136-

error: C-variadic function must be declared with at least one named argument

137-

--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13

138-

|

139-

LL | fn i_f2(...) {}

140-

| ^^^

141-142112

error: only foreign or `unsafe extern "C"` functions may be C-variadic

143-

--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13

113+

--> $DIR/variadic-ffi-semantic-restrictions.rs:56:13

144114

|

145115

LL | fn i_f2(...) {}

146116

| ^^^

147117148118

error: `...` must be the last argument of a C-variadic function

149-

--> $DIR/variadic-ffi-semantic-restrictions.rs:64:13

119+

--> $DIR/variadic-ffi-semantic-restrictions.rs:58:13

150120

|

151121

LL | fn i_f3(..., x: isize, ...) {}

152122

| ^^^

153123154124

error: only foreign or `unsafe extern "C"` functions may be C-variadic

155-

--> $DIR/variadic-ffi-semantic-restrictions.rs:64:13

125+

--> $DIR/variadic-ffi-semantic-restrictions.rs:58:13

156126

|

157127

LL | fn i_f3(..., x: isize, ...) {}

158128

| ^^^ ^^^

159129160130

error: `...` must be the last argument of a C-variadic function

161-

--> $DIR/variadic-ffi-semantic-restrictions.rs:67:13

131+

--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13

162132

|

163133

LL | fn i_f4(..., x: isize, ...) {}

164134

| ^^^

165135166136

error: only foreign or `unsafe extern "C"` functions may be C-variadic

167-

--> $DIR/variadic-ffi-semantic-restrictions.rs:67:13

137+

--> $DIR/variadic-ffi-semantic-restrictions.rs:61:13

168138

|

169139

LL | fn i_f4(..., x: isize, ...) {}

170140

| ^^^ ^^^

171141172142

error: functions cannot be both `const` and C-variadic

173-

--> $DIR/variadic-ffi-semantic-restrictions.rs:70:5

143+

--> $DIR/variadic-ffi-semantic-restrictions.rs:64:5

174144

|

175145

LL | const fn i_f5(x: isize, ...) {}

176146

| ^^^^^ ^^^ C-variadic because of this

177147

| |

178148

| `const` because of this

179149180150

error: only foreign or `unsafe extern "C"` functions may be C-variadic

181-

--> $DIR/variadic-ffi-semantic-restrictions.rs:70:29

151+

--> $DIR/variadic-ffi-semantic-restrictions.rs:64:29

182152

|

183153

LL | const fn i_f5(x: isize, ...) {}

184154

| ^^^

185155186156

error: only foreign or `unsafe extern "C"` functions may be C-variadic

187-

--> $DIR/variadic-ffi-semantic-restrictions.rs:77:23

157+

--> $DIR/variadic-ffi-semantic-restrictions.rs:71:23

188158

|

189159

LL | fn t_f1(x: isize, ...) {}

190160

| ^^^

191161192162

error: only foreign or `unsafe extern "C"` functions may be C-variadic

193-

--> $DIR/variadic-ffi-semantic-restrictions.rs:79:23

163+

--> $DIR/variadic-ffi-semantic-restrictions.rs:73:23

194164

|

195165

LL | fn t_f2(x: isize, ...);

196166

| ^^^

197167198-

error: C-variadic function must be declared with at least one named argument

199-

--> $DIR/variadic-ffi-semantic-restrictions.rs:81:13

200-

|

201-

LL | fn t_f3(...) {}

202-

| ^^^

203-204168

error: only foreign or `unsafe extern "C"` functions may be C-variadic

205-

--> $DIR/variadic-ffi-semantic-restrictions.rs:81:13

169+

--> $DIR/variadic-ffi-semantic-restrictions.rs:75:13

206170

|

207171

LL | fn t_f3(...) {}

208172

| ^^^

209173210-

error: C-variadic function must be declared with at least one named argument

211-

--> $DIR/variadic-ffi-semantic-restrictions.rs:84:13

212-

|

213-

LL | fn t_f4(...);

214-

| ^^^

215-216174

error: only foreign or `unsafe extern "C"` functions may be C-variadic

217-

--> $DIR/variadic-ffi-semantic-restrictions.rs:84:13

175+

--> $DIR/variadic-ffi-semantic-restrictions.rs:77:13

218176

|

219177

LL | fn t_f4(...);

220178

| ^^^

221179222180

error: `...` must be the last argument of a C-variadic function

223-

--> $DIR/variadic-ffi-semantic-restrictions.rs:87:13

181+

--> $DIR/variadic-ffi-semantic-restrictions.rs:79:13

224182

|

225183

LL | fn t_f5(..., x: isize) {}

226184

| ^^^

227185228186

error: only foreign or `unsafe extern "C"` functions may be C-variadic

229-

--> $DIR/variadic-ffi-semantic-restrictions.rs:87:13

187+

--> $DIR/variadic-ffi-semantic-restrictions.rs:79:13

230188

|

231189

LL | fn t_f5(..., x: isize) {}

232190

| ^^^

233191234192

error: `...` must be the last argument of a C-variadic function

235-

--> $DIR/variadic-ffi-semantic-restrictions.rs:90:13

193+

--> $DIR/variadic-ffi-semantic-restrictions.rs:82:13

236194

|

237195

LL | fn t_f6(..., x: isize);

238196

| ^^^

239197240198

error: only foreign or `unsafe extern "C"` functions may be C-variadic

241-

--> $DIR/variadic-ffi-semantic-restrictions.rs:90:13

199+

--> $DIR/variadic-ffi-semantic-restrictions.rs:82:13

242200

|

243201

LL | fn t_f6(..., x: isize);

244202

| ^^^

245203246204

error[E0493]: destructor of `VaListImpl<'_>` cannot be evaluated at compile-time

247-

--> $DIR/variadic-ffi-semantic-restrictions.rs:35:43

205+

--> $DIR/variadic-ffi-semantic-restrictions.rs:32:43

248206

|

249207

LL | const unsafe extern "C" fn f4_1(x: isize, ...) {}

250208

| ^^^ - value is dropped here

251209

| |

252210

| the destructor for this type cannot be evaluated in constant functions

253211254212

error[E0493]: destructor of `VaListImpl<'_>` cannot be evaluated at compile-time

255-

--> $DIR/variadic-ffi-semantic-restrictions.rs:39:36

213+

--> $DIR/variadic-ffi-semantic-restrictions.rs:36:36

256214

|

257215

LL | const extern "C" fn f4_2(x: isize, ...) {}

258216

| ^^^ - value is dropped here

259217

| |

260218

| the destructor for this type cannot be evaluated in constant functions

261219262220

error[E0493]: destructor of `VaListImpl<'_>` cannot be evaluated at compile-time

263-

--> $DIR/variadic-ffi-semantic-restrictions.rs:70:29

221+

--> $DIR/variadic-ffi-semantic-restrictions.rs:64:29

264222

|

265223

LL | const fn i_f5(x: isize, ...) {}

266224

| ^^^ - value is dropped here

267225

| |

268226

| the destructor for this type cannot be evaluated in constant functions

269227270-

error: aborting due to 43 previous errors

228+

error: aborting due to 36 previous errors

271229272230

For more information about this error, try `rustc --explain E0493`.