]> git.proxmox.com Git - rustc.git/blame - src/tools/clippy/tests/ui/checked_conversions.stderr
New upstream version 1.52.1+dfsg1
[rustc.git] / src / tools / clippy / tests / ui / checked_conversions.stderr
CommitLineData
f20569fa
XL
1error: checked cast can be simplified
2 --> $DIR/checked_conversions.rs:17:13
3 |
4LL | let _ = value <= (u32::max_value() as i64) && value >= 0;
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::try_from(value).is_ok()`
6 |
7 = note: `-D clippy::checked-conversions` implied by `-D warnings`
8
9error: checked cast can be simplified
10 --> $DIR/checked_conversions.rs:18:13
11 |
12LL | let _ = value <= (u32::MAX as i64) && value >= 0;
13 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u32::try_from(value).is_ok()`
14
15error: checked cast can be simplified
16 --> $DIR/checked_conversions.rs:22:13
17 |
18LL | let _ = value <= i64::from(u16::max_value()) && value >= 0;
19 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::try_from(value).is_ok()`
20
21error: checked cast can be simplified
22 --> $DIR/checked_conversions.rs:23:13
23 |
24LL | let _ = value <= i64::from(u16::MAX) && value >= 0;
25 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::try_from(value).is_ok()`
26
27error: checked cast can be simplified
28 --> $DIR/checked_conversions.rs:27:13
29 |
30LL | let _ = value <= (u8::max_value() as isize) && value >= 0;
31 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u8::try_from(value).is_ok()`
32
33error: checked cast can be simplified
34 --> $DIR/checked_conversions.rs:28:13
35 |
36LL | let _ = value <= (u8::MAX as isize) && value >= 0;
37 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u8::try_from(value).is_ok()`
38
39error: checked cast can be simplified
40 --> $DIR/checked_conversions.rs:34:13
41 |
42LL | let _ = value <= (i32::max_value() as i64) && value >= (i32::min_value() as i64);
43 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i32::try_from(value).is_ok()`
44
45error: checked cast can be simplified
46 --> $DIR/checked_conversions.rs:35:13
47 |
48LL | let _ = value <= (i32::MAX as i64) && value >= (i32::MIN as i64);
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i32::try_from(value).is_ok()`
50
51error: checked cast can be simplified
52 --> $DIR/checked_conversions.rs:39:13
53 |
54LL | let _ = value <= i64::from(i16::max_value()) && value >= i64::from(i16::min_value());
55 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i16::try_from(value).is_ok()`
56
57error: checked cast can be simplified
58 --> $DIR/checked_conversions.rs:40:13
59 |
60LL | let _ = value <= i64::from(i16::MAX) && value >= i64::from(i16::MIN);
61 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i16::try_from(value).is_ok()`
62
63error: checked cast can be simplified
64 --> $DIR/checked_conversions.rs:46:13
65 |
66LL | let _ = value <= i32::max_value() as u32;
67 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i32::try_from(value).is_ok()`
68
69error: checked cast can be simplified
70 --> $DIR/checked_conversions.rs:47:13
71 |
72LL | let _ = value <= i32::MAX as u32;
73 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `i32::try_from(value).is_ok()`
74
75error: checked cast can be simplified
76 --> $DIR/checked_conversions.rs:51:13
77 |
78LL | let _ = value <= isize::max_value() as usize && value as i32 == 5;
79 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `isize::try_from(value).is_ok()`
80
81error: checked cast can be simplified
82 --> $DIR/checked_conversions.rs:52:13
83 |
84LL | let _ = value <= isize::MAX as usize && value as i32 == 5;
85 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `isize::try_from(value).is_ok()`
86
87error: checked cast can be simplified
88 --> $DIR/checked_conversions.rs:56:13
89 |
90LL | let _ = value <= u16::max_value() as u32 && value as i32 == 5;
91 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::try_from(value).is_ok()`
92
93error: checked cast can be simplified
94 --> $DIR/checked_conversions.rs:57:13
95 |
96LL | let _ = value <= u16::MAX as u32 && value as i32 == 5;
97 | ^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `u16::try_from(value).is_ok()`
98
99error: aborting due to 16 previous errors
100