|
1 |
| -error: attribute #[no_mangle] set on a Rust ABI function |
2 |
| - --> $DIR/no_mangle_with_rust_abi.rs:7:1 |
| 1 | +error: `#[no_mangle]` set on a function with the default (`Rust`) ABI |
| 2 | + --> $DIR/no_mangle_with_rust_abi.rs:5:1 |
3 | 3 | |
|
4 | 4 | LL | fn rust_abi_fn_one(arg_one: u32, arg_two: usize) {}
|
5 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `extern "C" fn rust_abi_fn_one(arg_one: u32, arg_two: usize)` |
| 5 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
6 | 6 | |
|
7 | 7 | = note: `-D clippy::no-mangle-with-rust-abi` implied by `-D warnings`
|
| 8 | +help: set an ABI |
| 9 | + | |
| 10 | +LL | extern "C" fn rust_abi_fn_one(arg_one: u32, arg_two: usize) {} |
| 11 | + | ++++++++++ |
| 12 | +help: or explicitly set the default |
| 13 | + | |
| 14 | +LL | extern "Rust" fn rust_abi_fn_one(arg_one: u32, arg_two: usize) {} |
| 15 | + | +++++++++++++ |
8 | 16 |
|
9 |
| -error: attribute #[no_mangle] set on a Rust ABI function |
10 |
| - --> $DIR/no_mangle_with_rust_abi.rs:10:1 |
| 17 | +error: `#[no_mangle]` set on a function with the default (`Rust`) ABI |
| 18 | + --> $DIR/no_mangle_with_rust_abi.rs:8:1 |
11 | 19 | |
|
12 | 20 | LL | pub fn rust_abi_fn_two(arg_one: u32, arg_two: usize) {}
|
13 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pub extern "C" fn rust_abi_fn_two(arg_one: u32, arg_two: usize)` |
| 21 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 22 | + | |
| 23 | +help: set an ABI |
| 24 | + | |
| 25 | +LL | pub extern "C" fn rust_abi_fn_two(arg_one: u32, arg_two: usize) {} |
| 26 | + | ++++++++++ |
| 27 | +help: or explicitly set the default |
| 28 | + | |
| 29 | +LL | pub extern "Rust" fn rust_abi_fn_two(arg_one: u32, arg_two: usize) {} |
| 30 | + | +++++++++++++ |
14 | 31 |
|
15 |
| -error: attribute #[no_mangle] set on a Rust ABI function |
16 |
| - --> $DIR/no_mangle_with_rust_abi.rs:15:1 |
| 32 | +error: `#[no_mangle]` set on a function with the default (`Rust`) ABI |
| 33 | + --> $DIR/no_mangle_with_rust_abi.rs:13:1 |
17 | 34 | |
|
18 | 35 | LL | pub unsafe fn rust_abi_fn_three(arg_one: u32, arg_two: usize) {}
|
19 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pub unsafe extern "C" fn rust_abi_fn_three(arg_one: u32, arg_two: usize)` |
| 36 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 37 | + | |
| 38 | +help: set an ABI |
| 39 | + | |
| 40 | +LL | pub unsafe extern "C" fn rust_abi_fn_three(arg_one: u32, arg_two: usize) {} |
| 41 | + | ++++++++++ |
| 42 | +help: or explicitly set the default |
| 43 | + | |
| 44 | +LL | pub unsafe extern "Rust" fn rust_abi_fn_three(arg_one: u32, arg_two: usize) {} |
| 45 | + | +++++++++++++ |
20 | 46 |
|
21 |
| -error: attribute #[no_mangle] set on a Rust ABI function |
22 |
| - --> $DIR/no_mangle_with_rust_abi.rs:20:1 |
| 47 | +error: `#[no_mangle]` set on a function with the default (`Rust`) ABI |
| 48 | + --> $DIR/no_mangle_with_rust_abi.rs:18:1 |
23 | 49 | |
|
24 | 50 | LL | unsafe fn rust_abi_fn_four(arg_one: u32, arg_two: usize) {}
|
25 |
| - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unsafe extern "C" fn rust_abi_fn_four(arg_one: u32, arg_two: usize)` |
| 51 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 52 | + | |
| 53 | +help: set an ABI |
| 54 | + | |
| 55 | +LL | unsafe extern "C" fn rust_abi_fn_four(arg_one: u32, arg_two: usize) {} |
| 56 | + | ++++++++++ |
| 57 | +help: or explicitly set the default |
| 58 | + | |
| 59 | +LL | unsafe extern "Rust" fn rust_abi_fn_four(arg_one: u32, arg_two: usize) {} |
| 60 | + | +++++++++++++ |
26 | 61 |
|
27 |
| -error: attribute #[no_mangle] set on a Rust ABI function |
28 |
| - --> $DIR/no_mangle_with_rust_abi.rs:23:1 |
| 62 | +error: `#[no_mangle]` set on a function with the default (`Rust`) ABI |
| 63 | + --> $DIR/no_mangle_with_rust_abi.rs:21:1 |
29 | 64 | |
|
30 | 65 | LL | / fn rust_abi_multiline_function_really_long_name_to_overflow_args_to_multiple_lines(
|
31 | 66 | LL | | arg_one: u32,
|
32 | 67 | LL | | arg_two: usize,
|
33 | 68 | LL | | ) -> u32 {
|
34 | 69 | | |________^
|
35 | 70 | |
|
36 |
| -help: try |
| 71 | +help: set an ABI |
37 | 72 | |
|
38 |
| -LL + extern "C" fn rust_abi_multiline_function_really_long_name_to_overflow_args_to_multiple_lines( |
39 |
| -LL + arg_one: u32, |
40 |
| -LL + arg_two: usize, |
41 |
| -LL ~ ) -> u32 { |
| 73 | +LL | extern "C" fn rust_abi_multiline_function_really_long_name_to_overflow_args_to_multiple_lines( |
| 74 | + | ++++++++++ |
| 75 | +help: or explicitly set the default |
42 | 76 | |
|
| 77 | +LL | extern "Rust" fn rust_abi_multiline_function_really_long_name_to_overflow_args_to_multiple_lines( |
| 78 | + | +++++++++++++ |
43 | 79 |
|
44 | 80 | error: aborting due to 5 previous errors
|
45 | 81 |
|
0 commit comments