1 // Copyright 2014-2018 The Rust Project Developers. See the COPYRIGHT
2 // file at the top-level directory of this distribution.
4 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
5 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
6 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
7 // option. This file may not be copied, modified, or distributed
8 // except according to those terms.
11 #![feature(tool_lints)]
14 #![warn(clippy::invalid_upcast_comparisons)]
15 #![allow(unused, clippy::eq_op, clippy::no_effect, clippy::unnecessary_operation, clippy::cast_lossless)]
17 fn mk_value<T>() -> T { unimplemented!() }
20 let u32: u32 = mk_value();
21 let u8: u8 = mk_value();
22 let i32: i32 = mk_value();
23 let i8: i8 = mk_value();
25 // always false, since no u8 can be > 300
34 // inverted of the above
44 // always false, since u8 -> i32 doesn't wrap
47 // inverted of the above
51 // always false, since no u8 can be 1337
54 // inverted of the above