forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
/
numeric-cast-no-fix.stderr
74 lines (67 loc) · 1.93 KB
/
numeric-cast-no-fix.stderr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
error[E0308]: mismatched types
--> $DIR/numeric-cast-no-fix.rs:10:15
|
LL | x_usize > -1_isize;
| ^^^^^^^^ expected `usize`, found `isize`
|
note: `-1_isize` cannot fit into type `usize`
--> $DIR/numeric-cast-no-fix.rs:10:15
|
LL | x_usize > -1_isize;
| ^^^^^^^^
error[E0308]: mismatched types
--> $DIR/numeric-cast-no-fix.rs:12:14
|
LL | x_u128 > -1_isize;
| ^^^^^^^^ expected `u128`, found `isize`
|
note: `-1_isize` cannot fit into type `u128`
--> $DIR/numeric-cast-no-fix.rs:12:14
|
LL | x_u128 > -1_isize;
| ^^^^^^^^
error[E0308]: mismatched types
--> $DIR/numeric-cast-no-fix.rs:14:13
|
LL | x_u64 > -1_isize;
| ^^^^^^^^ expected `u64`, found `isize`
|
note: `-1_isize` cannot fit into type `u64`
--> $DIR/numeric-cast-no-fix.rs:14:13
|
LL | x_u64 > -1_isize;
| ^^^^^^^^
error[E0308]: mismatched types
--> $DIR/numeric-cast-no-fix.rs:16:13
|
LL | x_u32 > -1_isize;
| ^^^^^^^^ expected `u32`, found `isize`
|
note: `-1_isize` cannot fit into type `u32`
--> $DIR/numeric-cast-no-fix.rs:16:13
|
LL | x_u32 > -1_isize;
| ^^^^^^^^
error[E0308]: mismatched types
--> $DIR/numeric-cast-no-fix.rs:18:13
|
LL | x_u16 > -1_isize;
| ^^^^^^^^ expected `u16`, found `isize`
|
note: `-1_isize` cannot fit into type `u16`
--> $DIR/numeric-cast-no-fix.rs:18:13
|
LL | x_u16 > -1_isize;
| ^^^^^^^^
error[E0308]: mismatched types
--> $DIR/numeric-cast-no-fix.rs:20:12
|
LL | x_u8 > -1_isize;
| ^^^^^^^^ expected `u8`, found `isize`
|
help: you can convert `x_u8` from `u8` to `isize`, matching the type of `-1_isize`
|
LL | isize::from(x_u8) > -1_isize;
| ^^^^^^^^^^^^^^^^^
error: aborting due to 6 previous errors
For more information about this error, try `rustc --explain E0308`.