diff options
Diffstat (limited to 'src/test/ui/tag-variant-cast-non-nullary.rs')
-rw-r--r-- | src/test/ui/tag-variant-cast-non-nullary.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/src/test/ui/tag-variant-cast-non-nullary.rs b/src/test/ui/tag-variant-cast-non-nullary.rs deleted file mode 100644 index 0d0c6188a..000000000 --- a/src/test/ui/tag-variant-cast-non-nullary.rs +++ /dev/null @@ -1,20 +0,0 @@ -// run-rustfix -#![allow(dead_code, unused_variables)] -enum NonNullary { - Nullary, - Other(isize), -} - -impl From<NonNullary> for isize { - fn from(val: NonNullary) -> isize { - match val { - NonNullary::Nullary => 0, - NonNullary::Other(i) => i, - } - } -} - -fn main() { - let v = NonNullary::Nullary; - let val = v as isize; //~ ERROR non-primitive cast: `NonNullary` as `isize` [E0605] -} |