summaryrefslogtreecommitdiffstats
path: root/src/tools/clippy/tests/ui/no_mangle_with_rust_abi.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:50 +0000
commit2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35 (patch)
treed325add32978dbdc1db975a438b3a77d571b1ab8 /src/tools/clippy/tests/ui/no_mangle_with_rust_abi.stderr
parentReleasing progress-linux version 1.68.2+dfsg1-1~progress7.99u1. (diff)
downloadrustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.tar.xz
rustc-2e00214b3efbdfeefaa0fe9e8b8fd519de7adc35.zip
Merging upstream version 1.69.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/tools/clippy/tests/ui/no_mangle_with_rust_abi.stderr')
-rw-r--r--src/tools/clippy/tests/ui/no_mangle_with_rust_abi.stderr45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/tools/clippy/tests/ui/no_mangle_with_rust_abi.stderr b/src/tools/clippy/tests/ui/no_mangle_with_rust_abi.stderr
new file mode 100644
index 000000000..71517d318
--- /dev/null
+++ b/src/tools/clippy/tests/ui/no_mangle_with_rust_abi.stderr
@@ -0,0 +1,45 @@
+error: attribute #[no_mangle] set on a Rust ABI function
+ --> $DIR/no_mangle_with_rust_abi.rs:7:1
+ |
+LL | fn rust_abi_fn_one(arg_one: u32, arg_two: usize) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `extern "C" fn rust_abi_fn_one(arg_one: u32, arg_two: usize)`
+ |
+ = note: `-D clippy::no-mangle-with-rust-abi` implied by `-D warnings`
+
+error: attribute #[no_mangle] set on a Rust ABI function
+ --> $DIR/no_mangle_with_rust_abi.rs:10:1
+ |
+LL | pub fn rust_abi_fn_two(arg_one: u32, arg_two: usize) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pub extern "C" fn rust_abi_fn_two(arg_one: u32, arg_two: usize)`
+
+error: attribute #[no_mangle] set on a Rust ABI function
+ --> $DIR/no_mangle_with_rust_abi.rs:15:1
+ |
+LL | pub unsafe fn rust_abi_fn_three(arg_one: u32, arg_two: usize) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `pub unsafe extern "C" fn rust_abi_fn_three(arg_one: u32, arg_two: usize)`
+
+error: attribute #[no_mangle] set on a Rust ABI function
+ --> $DIR/no_mangle_with_rust_abi.rs:20:1
+ |
+LL | unsafe fn rust_abi_fn_four(arg_one: u32, arg_two: usize) {}
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unsafe extern "C" fn rust_abi_fn_four(arg_one: u32, arg_two: usize)`
+
+error: attribute #[no_mangle] set on a Rust ABI function
+ --> $DIR/no_mangle_with_rust_abi.rs:23:1
+ |
+LL | / fn rust_abi_multiline_function_really_long_name_to_overflow_args_to_multiple_lines(
+LL | | arg_one: u32,
+LL | | arg_two: usize,
+LL | | ) -> u32 {
+ | |________^
+ |
+help: try
+ |
+LL + extern "C" fn rust_abi_multiline_function_really_long_name_to_overflow_args_to_multiple_lines(
+LL + arg_one: u32,
+LL + arg_two: usize,
+LL ~ ) -> u32 {
+ |
+
+error: aborting due to 5 previous errors
+