summaryrefslogtreecommitdiffstats
path: root/compiler/rustc_error_codes/src/error_codes/E0633.md
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/rustc_error_codes/src/error_codes/E0633.md')
-rw-r--r--compiler/rustc_error_codes/src/error_codes/E0633.md27
1 files changed, 27 insertions, 0 deletions
diff --git a/compiler/rustc_error_codes/src/error_codes/E0633.md b/compiler/rustc_error_codes/src/error_codes/E0633.md
new file mode 100644
index 000000000..5b6c15c82
--- /dev/null
+++ b/compiler/rustc_error_codes/src/error_codes/E0633.md
@@ -0,0 +1,27 @@
+#### Note: this error code is no longer emitted by the compiler.
+
+The `unwind` attribute was malformed.
+
+Erroneous code example:
+
+```compile_fail
+#![feature(unwind_attributes)]
+
+#[unwind()] // error: expected one argument
+pub extern "C" fn something() {}
+
+fn main() {}
+```
+
+The `#[unwind]` attribute should be used as follows:
+
+- `#[unwind(aborts)]` -- specifies that if a non-Rust ABI function
+ should abort the process if it attempts to unwind. This is the safer
+ and preferred option.
+
+- `#[unwind(allowed)]` -- specifies that a non-Rust ABI function
+ should be allowed to unwind. This can easily result in Undefined
+ Behavior (UB), so be careful.
+
+NB. The default behavior here is "allowed", but this is unspecified
+and likely to change in the future.