diff options
Diffstat (limited to 'tests/ui/never_type/never-assign-wrong-type.rs')
-rw-r--r-- | tests/ui/never_type/never-assign-wrong-type.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/never_type/never-assign-wrong-type.rs b/tests/ui/never_type/never-assign-wrong-type.rs new file mode 100644 index 000000000..67e26f566 --- /dev/null +++ b/tests/ui/never_type/never-assign-wrong-type.rs @@ -0,0 +1,8 @@ +// Test that we can't use another type in place of ! + +#![feature(never_type)] +#![deny(warnings)] + +fn main() { + let x: ! = "hello"; //~ ERROR mismatched types +} |