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.
10 #![warn(clippy::invalid_upcast_comparisons)]
15 clippy::unnecessary_operation,
19 fn mk_value<T>() -> T {
24 let u32: u32 = mk_value();
25 let u8: u8 = mk_value();
26 let i32: i32 = mk_value();
27 let i8: i8 = mk_value();
29 // always false, since no u8 can be > 300
38 // inverted of the above
48 // always false, since u8 -> i32 doesn't wrap
51 // inverted of the above
55 // always false, since no u8 can be 1337
58 // inverted of the above