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