]>
Commit | Line | Data |
---|---|---|
0531ce1d | 1 | error[E0425]: cannot find value `y` in this scope |
0731742a | 2 | --> $DIR/error-festival.rs:14:5 |
0531ce1d XL |
3 | | |
4 | LL | y = 2; | |
0731742a | 5 | | ^ help: a local variable with a similar name exists: `x` |
0531ce1d XL |
6 | |
7 | error[E0603]: constant `FOO` is private | |
0731742a | 8 | --> $DIR/error-festival.rs:22:10 |
0531ce1d XL |
9 | | |
10 | LL | foo::FOO; | |
dfeec247 XL |
11 | | ^^^ this constant is private |
12 | | | |
13 | note: the constant `FOO` is defined here | |
14 | --> $DIR/error-festival.rs:7:5 | |
15 | | | |
16 | LL | const FOO: u32 = 0; | |
17 | | ^^^^^^^^^^^^^^^^^^^ | |
0531ce1d XL |
18 | |
19 | error[E0368]: binary assignment operation `+=` cannot be applied to type `&str` | |
0731742a | 20 | --> $DIR/error-festival.rs:12:5 |
0531ce1d XL |
21 | | |
22 | LL | x += 2; | |
23 | | -^^^^^ | |
24 | | | | |
25 | | cannot use `+=` on type `&str` | |
94b46f34 XL |
26 | | |
27 | = note: an implementation of `std::ops::AddAssign` might be missing for `&str` | |
0531ce1d | 28 | |
dfeec247 | 29 | error[E0599]: no method named `z` found for reference `&str` in the current scope |
0731742a | 30 | --> $DIR/error-festival.rs:16:7 |
0531ce1d XL |
31 | | |
32 | LL | x.z(); | |
e1599b0c | 33 | | ^ method not found in `&str` |
0531ce1d XL |
34 | |
35 | error[E0600]: cannot apply unary operator `!` to type `Question` | |
0731742a | 36 | --> $DIR/error-festival.rs:19:5 |
0531ce1d XL |
37 | | |
38 | LL | !Question::Yes; | |
94b46f34 XL |
39 | | ^^^^^^^^^^^^^^ cannot apply unary operator `!` |
40 | | | |
41 | = note: an implementation of `std::ops::Not` might be missing for `Question` | |
0531ce1d XL |
42 | |
43 | error[E0604]: only `u8` can be cast as `char`, not `u32` | |
0731742a | 44 | --> $DIR/error-festival.rs:25:5 |
0531ce1d XL |
45 | | |
46 | LL | 0u32 as char; | |
47 | | ^^^^^^^^^^^^ | |
48 | ||
49 | error[E0605]: non-primitive cast: `u8` as `std::vec::Vec<u8>` | |
0731742a | 50 | --> $DIR/error-festival.rs:29:5 |
0531ce1d XL |
51 | | |
52 | LL | x as Vec<u8>; | |
53 | | ^^^^^^^^^^^^ | |
54 | | | |
55 | = note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait | |
56 | ||
57 | error[E0054]: cannot cast as `bool` | |
0731742a | 58 | --> $DIR/error-festival.rs:33:24 |
0531ce1d XL |
59 | | |
60 | LL | let x_is_nonzero = x as bool; | |
0731742a | 61 | | ^^^^^^^^^ help: compare with zero instead: `x != 0` |
0531ce1d XL |
62 | |
63 | error[E0606]: casting `&u8` as `u32` is invalid | |
0731742a | 64 | --> $DIR/error-festival.rs:37:18 |
0531ce1d XL |
65 | | |
66 | LL | let y: u32 = x as u32; | |
0731742a XL |
67 | | -^^^^^^^ |
68 | | | | |
69 | | cannot cast `&u8` as `u32` | |
70 | | help: dereference the expression: `*x` | |
0531ce1d XL |
71 | |
72 | error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]` | |
0731742a | 73 | --> $DIR/error-festival.rs:41:5 |
0531ce1d XL |
74 | | |
75 | LL | v as *const [u8]; | |
76 | | ^^^^^^^^^^^^^^^^ | |
77 | ||
78 | error: aborting due to 10 previous errors | |
79 | ||
48663c56 | 80 | Some errors have detailed explanations: E0054, E0368, E0425, E0599, E0600, E0603, E0604, E0605, E0606... |
0531ce1d | 81 | For more information about an error, try `rustc --explain E0054`. |