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