diff options
| author | Stefan Plantikow <stefan.plantikow@googlemail.com> | 2011-12-05 01:23:10 +0100 |
|---|---|---|
| committer | Stefan Plantikow <stefan.plantikow@googlemail.com> | 2011-12-05 01:23:10 +0100 |
| commit | a69eab16ec3435bd505a7dafcb9a82b5eace49a2 (patch) | |
| tree | 49b053d2d8effef75ece72d2d070c07f702640c7 /src/test/compile-fail | |
| parent | f1eb7ce013526c6ae75e92a31fe3b89b4cf44b3f (diff) | |
| download | rust-a69eab16ec3435bd505a7dafcb9a82b5eace49a2.tar.gz rust-a69eab16ec3435bd505a7dafcb9a82b5eace49a2.zip | |
typeck: Fix for #932
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/cast-from-nil.rs | 2 | ||||
| -rw-r--r-- | src/test/compile-fail/cast-to-nil.rs | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/test/compile-fail/cast-from-nil.rs b/src/test/compile-fail/cast-from-nil.rs new file mode 100644 index 00000000000..a76df00d0d5 --- /dev/null +++ b/src/test/compile-fail/cast-from-nil.rs @@ -0,0 +1,2 @@ +// error-pattern: cast from nil: () as u32 +fn main() { let u = (assert true) as u32; } \ No newline at end of file diff --git a/src/test/compile-fail/cast-to-nil.rs b/src/test/compile-fail/cast-to-nil.rs new file mode 100644 index 00000000000..44c0f5a1da2 --- /dev/null +++ b/src/test/compile-fail/cast-to-nil.rs @@ -0,0 +1,2 @@ +// error-pattern: cast to nil: u32 as () +fn main() { let u = 0u32 as (); } \ No newline at end of file |
