From 89db1d0fdc28276a7c0a10de26d89a603b329b37 Mon Sep 17 00:00:00 2001 From: Eric Huss Date: Sun, 7 Mar 2021 16:26:58 -0800 Subject: [PATCH] Fix misspelled word discrimnant --- src/type-layout.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/type-layout.md b/src/type-layout.md index 6df9a6095..bacd478e3 100644 --- a/src/type-layout.md +++ b/src/type-layout.md @@ -290,7 +290,7 @@ Rust's [field-less enums] with this representation. An `enum` in C is mostly a `typedef` plus some named constants; in other words, an object of an `enum` type can hold any integer value. For example, this is often used for bitflags in `C`. In contrast, Rust’s [field-less enums] can only legally hold -the discrimnant values, everything else is [undefined behavior]. Therefore, +the discriminant values, everything else is [undefined behavior]. Therefore, using a field-less enum in FFI to model a C `enum` is often wrong.