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