2013-09-04 16:05:31 -05:00
|
|
|
// Copyright 2013 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2015-07-26 19:31:38 -05:00
|
|
|
fn main() {
|
2015-09-11 03:15:58 -05:00
|
|
|
let u = 5 as bool;
|
2015-07-26 19:31:38 -05:00
|
|
|
//~^ ERROR cannot cast as `bool`
|
|
|
|
//~^^ HELP compare with zero instead
|
2016-03-14 22:36:43 -05:00
|
|
|
//~^^^ HELP run `rustc --explain E0054` to see a detailed explanation
|
2015-07-26 19:31:38 -05:00
|
|
|
}
|