rust/src/test/compile-fail/index_message.rs

6 lines
103 B
Rust
Raw Normal View History

2012-06-20 19:07:54 -05:00
// error-pattern:cannot index a value of type `()`
fn main() {
let z = ();
2012-06-20 19:07:54 -05:00
log(error, z[0]);
}