Skip to content

Commit 3935394

Browse files
---
yaml --- r: 226102 b: refs/heads/stable c: ccb459e h: refs/heads/master v: v3
1 parent 0f19400 commit 3935394

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ refs/heads/tmp: e5d90d98402475b6e154ce216f9efcb80da1a747
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: 1fe32ca12c51afcd761d9962f51a74ff0d07a591
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 11f0f4722027272319a556528a9000ca67e9b35a
32+
refs/heads/stable: ccb459e49aa52ba55a59520d49350f05a7c9a0db
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b

branches/stable/src/librustc_typeck/diagnostics.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,19 +381,24 @@ fn main() {
381381
"##,
382382

383383
E0045: r##"
384-
Variadic parameters are only allowed in extern "C" code. Examples of
385-
erroneous code:
384+
Rust only supports variadic parameters for interoperability with C code in its
385+
FFI. As such, variadic parameters can only be used with functions which are
386+
using the C ABI. Examples of erroneous code:
386387
387388
```
388389
extern "rust-call" { fn foo(x: u8, ...); }
389390
// or
390391
fn foo(x: u8, ...) {}
391392
```
392393
393-
To fix such code, put them in extern "C" block:
394+
To fix such code, put them in an extern "C" block:
394395
395396
```
396397
extern "C" fn foo (x: u8, ...);
398+
// or:
399+
extern "C" {
400+
fn foo (x: u8, ...);
401+
}
397402
```
398403
"##,
399404

0 commit comments

Comments
 (0)