]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_error_codes/src/error_codes/E0633.md
Re-use std::sealed::Sealed in os/linux/process.
[rust.git] / compiler / rustc_error_codes / src / error_codes / E0633.md
1 The `unwind` attribute was malformed.
2
3 Erroneous code example:
4
5 ```compile_fail,E0633
6 #![feature(unwind_attributes)]
7
8 #[unwind()] // error: expected one argument
9 pub extern "C" fn something() {}
10
11 fn main() {}
12 ```
13
14 The `#[unwind]` attribute should be used as follows:
15
16 - `#[unwind(aborts)]` -- specifies that if a non-Rust ABI function
17   should abort the process if it attempts to unwind. This is the safer
18   and preferred option.
19
20 - `#[unwind(allowed)]` -- specifies that a non-Rust ABI function
21   should be allowed to unwind. This can easily result in Undefined
22   Behavior (UB), so be careful.
23
24 NB. The default behavior here is "allowed", but this is unspecified
25 and likely to change in the future.