Skip to content

Commit 11bb297

Browse files
Clean up E0045
1 parent a5fcc51 commit 11bb297

File tree

1 file changed

+10
-10
lines changed
  • src/librustc_error_codes/error_codes

1 file changed

+10
-10
lines changed

src/librustc_error_codes/error_codes/E0045.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
Rust only supports variadic parameters for interoperability with C code in its
2-
FFI. As such, variadic parameters can only be used with functions which are
3-
using the C ABI. Examples of erroneous code:
4-
5-
```compile_fail
6-
#![feature(unboxed_closures)]
1+
Variadic parameters have been used on a non-C ABI function.
72

8-
extern "rust-call" { fn foo(x: u8, ...); }
3+
Erroneous code example:
94

10-
// or
5+
```compile_fail,E0045
6+
#![feature(unboxed_closures)]
117
12-
fn foo(x: u8, ...) {}
8+
extern "rust-call" {
9+
fn foo(x: u8, ...); // error!
10+
}
1311
```
1412

15-
To fix such code, put them in an extern "C" block:
13+
Rust only supports variadic parameters for interoperability with C code in its
14+
FFI. As such, variadic parameters can only be used with functions which are
15+
using the C ABI. To fix such code, put them in an extern "C" block:
1616

1717
```
1818
extern "C" {

0 commit comments

Comments
 (0)