File tree Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Expand file tree Collapse file tree 1 file changed +4
-13
lines changed Original file line number Diff line number Diff line change @@ -533,19 +533,10 @@ attribute turns off Rust's name mangling, so that it is easier to link to.
533
533
534
534
# FFI and panics
535
535
536
- It’s important to be mindful of ` panic! ` s when working with FFI. This code,
537
- when called from C, will ` abort ` :
538
-
539
- ``` rust
540
- #[no_mangle]
541
- pub extern fn oh_no () -> ! {
542
- panic! (" Oops!" );
543
- }
544
- # fn main () {}
545
- ```
546
-
547
- If you’re writing code that may panic, you should run it in another thread,
548
- so that the panic doesn’t bubble up to C:
536
+ It’s important to be mindful of ` panic! ` s when working with FFI. A ` panic! `
537
+ across an FFI boundary is undefined behavior. If you’re writing code that may
538
+ panic, you should run it in another thread, so that the panic doesn’t bubble up
539
+ to C:
549
540
550
541
``` rust
551
542
use std :: thread;
You can’t perform that action at this time.
0 commit comments