From a540310c3c8b41218cff9e34cbf54fadd959dfa1 Mon Sep 17 00:00:00 2001 From: Connor Horman Date: Mon, 25 Nov 2024 15:09:22 -0500 Subject: [PATCH] Move note in linkage.md --- src/linkage.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/linkage.md b/src/linkage.md index 47c63a097..e1251ccc0 100644 --- a/src/linkage.md +++ b/src/linkage.md @@ -296,15 +296,16 @@ with these characteristics: > cause a link-error, since that ABI is not expected to be used as an > entrypoint into a static or shared library. +> **Note**: the restriction can only be violated when mixing code with different +> `-C panic` flags. This is not possible in normal use of cargo, so most users +> need not be concerned about this. + r[link.foreign-code.prohibited.lint.ffi_unwind_calls] To guarantee that a library will be sound (and linkable with `rustc`) regardless of the panic mode used at link-time, the [`ffi_unwind_calls` lint] may be used. The lint flags any calls to `-unwind` foreign functions or function pointers. -> **Note**: the restriction can only be violated when mixing code with different -> `-C panic` flags. This is not possible in normal use of cargo, so most users -> need not be concerned about this. [`cfg` attribute `target_feature` option]: conditional-compilation.md#target_feature [`ffi_unwind_calls` lint]: ../rustc/lints/listing/allowed-by-default.html#ffi-unwind-calls