about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/tools/miri/src/diagnostics.rs2
-rw-r--r--src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr2
-rw-r--r--src/tools/miri/tests/fail/shims/return_type_mismatch.stderr2
3 files changed, 5 insertions, 1 deletions
diff --git a/src/tools/miri/src/diagnostics.rs b/src/tools/miri/src/diagnostics.rs
index 8fdf8d643ea..9ecbd31c5b9 100644
--- a/src/tools/miri/src/diagnostics.rs
+++ b/src/tools/miri/src/diagnostics.rs
@@ -382,7 +382,7 @@ pub fn report_error<'tcx>(
                             helps.push(note_span!(span, "{:?} was deallocated here:", alloc_id));
                         }
                     }
-                    AbiMismatchArgument { .. } => {
+                    AbiMismatchArgument { .. } | AbiMismatchReturn { .. } => {
                         helps.push(note!("this means these two types are not *guaranteed* to be ABI-compatible across all targets"));
                         helps.push(note!("if you think this code should be accepted anyway, please report an issue with Miri"));
                     }
diff --git a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr
index 07e6561b53e..28c676ad482 100644
--- a/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr
+++ b/src/tools/miri/tests/fail/function_pointers/abi_mismatch_return_type.stderr
@@ -6,6 +6,8 @@ LL |     g()
    |
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at tests/fail/function_pointers/abi_mismatch_return_type.rs:LL:CC
 
diff --git a/src/tools/miri/tests/fail/shims/return_type_mismatch.stderr b/src/tools/miri/tests/fail/shims/return_type_mismatch.stderr
index 080ee16a2eb..18ff3067fa0 100644
--- a/src/tools/miri/tests/fail/shims/return_type_mismatch.stderr
+++ b/src/tools/miri/tests/fail/shims/return_type_mismatch.stderr
@@ -6,6 +6,8 @@ LL |         close(fd);
    |
    = help: this indicates a bug in the program: it performed an invalid operation, and caused Undefined Behavior
    = help: see https://doc.rust-lang.org/nightly/reference/behavior-considered-undefined.html for further information
+   = help: this means these two types are not *guaranteed* to be ABI-compatible across all targets
+   = help: if you think this code should be accepted anyway, please report an issue with Miri
    = note: BACKTRACE:
    = note: inside `main` at tests/fail/shims/return_type_mismatch.rs:LL:CC