File: discriminant-ill-typed.stderr

package info (click to toggle)
rustc 1.87.0%2Bdfsg1-1~bpo13%2B2
  • links: PTS, VCS
  • area: main
  • in suites: trixie-backports
  • size: 925,560 kB
  • sloc: xml: 158,127; python: 36,039; javascript: 19,761; sh: 19,737; cpp: 18,981; ansic: 13,133; asm: 4,376; makefile: 710; perl: 29; lisp: 28; ruby: 19; sql: 11
file content (99 lines) | stat: -rw-r--r-- 2,455 bytes parent folder | download | duplicates (11)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:15:16
   |
LL |         OhNo = 0_u8,
   |                ^^^^ expected `i8`, found `u8`
   |
help: change the type of the numeric literal from `u8` to `i8`
   |
LL -         OhNo = 0_u8,
LL +         OhNo = 0_i8,
   |

error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:28:16
   |
LL |         OhNo = 0_i8,
   |                ^^^^ expected `u8`, found `i8`
   |
help: change the type of the numeric literal from `i8` to `u8`
   |
LL -         OhNo = 0_i8,
LL +         OhNo = 0_u8,
   |

error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:41:16
   |
LL |         OhNo = 0_u16,
   |                ^^^^^ expected `i16`, found `u16`
   |
help: change the type of the numeric literal from `u16` to `i16`
   |
LL -         OhNo = 0_u16,
LL +         OhNo = 0_i16,
   |

error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:54:16
   |
LL |         OhNo = 0_i16,
   |                ^^^^^ expected `u16`, found `i16`
   |
help: change the type of the numeric literal from `i16` to `u16`
   |
LL -         OhNo = 0_i16,
LL +         OhNo = 0_u16,
   |

error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:67:16
   |
LL |         OhNo = 0_u32,
   |                ^^^^^ expected `i32`, found `u32`
   |
help: change the type of the numeric literal from `u32` to `i32`
   |
LL -         OhNo = 0_u32,
LL +         OhNo = 0_i32,
   |

error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:80:16
   |
LL |         OhNo = 0_i32,
   |                ^^^^^ expected `u32`, found `i32`
   |
help: change the type of the numeric literal from `i32` to `u32`
   |
LL -         OhNo = 0_i32,
LL +         OhNo = 0_u32,
   |

error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:93:16
   |
LL |         OhNo = 0_u64,
   |                ^^^^^ expected `i64`, found `u64`
   |
help: change the type of the numeric literal from `u64` to `i64`
   |
LL -         OhNo = 0_u64,
LL +         OhNo = 0_i64,
   |

error[E0308]: mismatched types
  --> $DIR/discriminant-ill-typed.rs:106:16
   |
LL |         OhNo = 0_i64,
   |                ^^^^^ expected `u64`, found `i64`
   |
help: change the type of the numeric literal from `i64` to `u64`
   |
LL -         OhNo = 0_i64,
LL +         OhNo = 0_u64,
   |

error: aborting due to 8 previous errors

For more information about this error, try `rustc --explain E0308`.