diff options
| author | bors <bors@rust-lang.org> | 2013-05-03 00:12:37 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-03 00:12:37 -0700 |
| commit | 984180c600b083b272237c0b343bb3e3dd844086 (patch) | |
| tree | a632192dfc382b1a89226e58541fe8bc93c22e00 /src/test | |
| parent | 2ae44a07a9d508d0ad413e70d3152a0f4a087976 (diff) | |
| parent | c0f587de34f30b060df8a88c4068740e587b9340 (diff) | |
auto merge of #6204 : pcwalton/rust/uninhabited-enum-cast, r=catamorphism
r? @catamorphism
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/uninhabited-enum-cast.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/test/compile-fail/uninhabited-enum-cast.rs b/src/test/compile-fail/uninhabited-enum-cast.rs new file mode 100644 index 00000000000..c4a5dc4710c --- /dev/null +++ b/src/test/compile-fail/uninhabited-enum-cast.rs @@ -0,0 +1,7 @@ +enum E {} + +fn f(e: E) { + println((e as int).to_str()); //~ ERROR non-scalar cast +} + +fn main() {} |
