diff options
Diffstat (limited to 'tests/ui/rfc-2008-non-exhaustive/enum-as-cast.rs')
-rw-r--r-- | tests/ui/rfc-2008-non-exhaustive/enum-as-cast.rs | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/tests/ui/rfc-2008-non-exhaustive/enum-as-cast.rs b/tests/ui/rfc-2008-non-exhaustive/enum-as-cast.rs deleted file mode 100644 index 5dce8180f..000000000 --- a/tests/ui/rfc-2008-non-exhaustive/enum-as-cast.rs +++ /dev/null @@ -1,11 +0,0 @@ -// aux-build:enums.rs - -extern crate enums; - -use enums::FieldLessWithNonExhaustiveVariant; - -fn main() { - let e = FieldLessWithNonExhaustiveVariant::default(); - let d = e as u8; //~ ERROR casting `FieldLessWithNonExhaustiveVariant` as `u8` is invalid [E0606] - assert_eq!(d, 0); -} |