2018-02-24 08:48:53 -06:00
|
|
|
error[E0425]: cannot find value `y` in this scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:14:5
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | y = 2;
|
2019-01-09 13:11:00 -06:00
|
|
|
| ^ help: a local variable with a similar name exists: `x`
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
|
|
error[E0603]: constant `FOO` is private
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:22:10
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | foo::FOO;
|
2020-03-22 17:36:54 -05:00
|
|
|
| ^^^ private constant
|
2020-01-12 07:04:03 -06:00
|
|
|
|
|
|
|
|
note: the constant `FOO` is defined here
|
|
|
|
--> $DIR/error-festival.rs:7:5
|
|
|
|
|
|
|
|
|
LL | const FOO: u32 = 0;
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
|
|
error[E0368]: binary assignment operation `+=` cannot be applied to type `&str`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:12:5
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | x += 2;
|
2018-02-24 08:48:53 -06:00
|
|
|
| -^^^^^
|
|
|
|
| |
|
|
|
|
| cannot use `+=` on type `&str`
|
|
|
|
|
2020-01-08 10:05:31 -06:00
|
|
|
error[E0599]: no method named `z` found for reference `&str` in the current scope
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:16:7
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | x.z();
|
2019-09-06 14:00:07 -05:00
|
|
|
| ^ method not found in `&str`
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
|
|
error[E0600]: cannot apply unary operator `!` to type `Question`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:19:5
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | !Question::Yes;
|
2018-05-08 14:20:41 -05:00
|
|
|
| ^^^^^^^^^^^^^^ cannot apply unary operator `!`
|
2018-04-22 12:35:21 -05:00
|
|
|
|
|
2021-09-28 09:48:54 -05:00
|
|
|
note: an implementation of `Not` might be missing for `Question`
|
|
|
|
--> $DIR/error-festival.rs:1:1
|
|
|
|
|
|
|
|
|
LL | enum Question {
|
|
|
|
| ^^^^^^^^^^^^^ must implement `Not`
|
2022-12-12 05:55:46 -06:00
|
|
|
note: the trait `Not` must be implemented
|
2021-09-28 09:48:54 -05:00
|
|
|
--> $SRC_DIR/core/src/ops/bit.rs:LL:COL
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
|
|
error[E0604]: only `u8` can be cast as `char`, not `u32`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:25:5
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2022-01-25 17:19:00 -06:00
|
|
|
LL | 0u32 as char;
|
|
|
|
| ^^^^^^^^^^^^
|
2022-05-19 09:33:40 -05:00
|
|
|
| |
|
|
|
|
| invalid cast
|
|
|
|
| help: try `char::from_u32` instead: `char::from_u32(0u32)`
|
2018-02-24 08:48:53 -06:00
|
|
|
|
2020-09-02 02:40:56 -05:00
|
|
|
error[E0605]: non-primitive cast: `u8` as `Vec<u8>`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:29:5
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | x as Vec<u8>;
|
2020-06-14 23:36:25 -05:00
|
|
|
| ^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
|
|
error[E0054]: cannot cast as `bool`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:33:24
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | let x_is_nonzero = x as bool;
|
2019-01-09 15:57:49 -06:00
|
|
|
| ^^^^^^^^^ help: compare with zero instead: `x != 0`
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
|
|
error[E0606]: casting `&u8` as `u32` is invalid
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:37:18
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | let y: u32 = x as u32;
|
2023-01-16 01:24:01 -06:00
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
help: dereference the expression
|
|
|
|
|
|
|
|
|
LL | let y: u32 = *x as u32;
|
|
|
|
| +
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
|
|
error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]`
|
2018-12-25 09:56:47 -06:00
|
|
|
--> $DIR/error-festival.rs:41:5
|
2018-02-24 08:48:53 -06:00
|
|
|
|
|
2018-02-24 17:59:34 -06:00
|
|
|
LL | v as *const [u8];
|
2018-02-24 08:48:53 -06:00
|
|
|
| ^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 10 previous errors
|
|
|
|
|
2019-04-17 12:26:38 -05:00
|
|
|
Some errors have detailed explanations: E0054, E0368, E0425, E0599, E0600, E0603, E0604, E0605, E0606...
|
2018-03-03 08:59:40 -06:00
|
|
|
For more information about an error, try `rustc --explain E0054`.
|