rust/src/test/compile-fail/uninhabited-enum-cast.rs
Brendan Zabarauskas 4fc0452ace Remove re-exports of std::io::stdio::{print, println} in the prelude.
The `print!` and `println!` macros are now the preferred method of printing, and so there is no reason to export the `stdio` functions in the prelude. The functions have also been replaced by their macro counterparts in the tutorial and other documentation so that newcomers don't get confused about what they should be using.
2014-01-11 10:46:00 +11:00

8 lines
109 B
Rust

enum E {}
fn f(e: E) {
println!("{}", (e as int).to_str()); //~ ERROR non-scalar cast
}
fn main() {}