rust/tests/ui/never_type/never-assign-wrong-type.rs
2023-01-11 09:32:08 +00:00

9 lines
163 B
Rust

// Test that we can't use another type in place of !
#![feature(never_type)]
#![deny(warnings)]
fn main() {
let x: ! = "hello"; //~ ERROR mismatched types
}