summaryrefslogtreecommitdiff
path: root/src/codegen/mod.rs
diff options
context:
space:
mode:
authorAphek <bilkow@tutanota.com>2020-03-25 02:11:12 -0300
committerEmilio Cobos Álvarez <emilio@crisal.io>2020-03-25 09:27:14 +0100
commitf568d095774bd5642fe8404e13268e43bd47327a (patch)
tree3269ae75dab19a7410e73c51194959d2cc7492cf /src/codegen/mod.rs
parent92e8fa04206a54ab4ee07bf078e8a5f659f78040 (diff)
Indicate undefined behaviour in enum docs and point to alternative
Diffstat (limited to 'src/codegen/mod.rs')
-rw-r--r--src/codegen/mod.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/codegen/mod.rs b/src/codegen/mod.rs
index 2be9794b..73cc2f25 100644
--- a/src/codegen/mod.rs
+++ b/src/codegen/mod.rs
@@ -2285,7 +2285,9 @@ impl MethodCodegen for Method {
/// A helper type that represents different enum variations.
#[derive(Copy, Clone, PartialEq, Debug)]
pub enum EnumVariation {
- /// The code for this enum will use a Rust enum
+ /// The code for this enum will use a Rust enum. Note that creating this in unsafe code
+ /// (including FFI) with an invalid value will invoke undefined behaviour, whether or not
+ /// its marked as non_exhaustive.
Rust {
/// Indicates whether the generated struct should be `#[non_exhaustive]`
non_exhaustive: bool,