rust/src/test/ui/error-festival.stderr

77 lines
2.0 KiB
Plaintext
Raw Normal View History

error[E0425]: cannot find value `y` in this scope
--> $DIR/error-festival.rs:24:5
|
2018-02-24 17:59:34 -06:00
LL | y = 2;
| ^ did you mean `x`?
error[E0603]: constant `FOO` is private
--> $DIR/error-festival.rs:32:5
|
2018-02-24 17:59:34 -06:00
LL | foo::FOO;
| ^^^^^^^^
error[E0368]: binary assignment operation `+=` cannot be applied to type `&str`
--> $DIR/error-festival.rs:22:5
|
2018-02-24 17:59:34 -06:00
LL | x += 2;
| -^^^^^
| |
| cannot use `+=` on type `&str`
error[E0599]: no method named `z` found for type `&str` in the current scope
--> $DIR/error-festival.rs:26:7
|
2018-02-24 17:59:34 -06:00
LL | x.z();
| ^
error[E0600]: cannot apply unary operator `!` to type `Question`
--> $DIR/error-festival.rs:29:5
|
2018-02-24 17:59:34 -06:00
LL | !Question::Yes;
| ^^^^^^^^^^^^^^
error[E0604]: only `u8` can be cast as `char`, not `u32`
--> $DIR/error-festival.rs:35:5
|
2018-02-24 17:59:34 -06:00
LL | 0u32 as char;
| ^^^^^^^^^^^^
error[E0605]: non-primitive cast: `u8` as `std::vec::Vec<u8>`
--> $DIR/error-festival.rs:39:5
|
2018-02-24 17:59:34 -06:00
LL | x as Vec<u8>;
| ^^^^^^^^^^^^
|
= note: an `as` expression can only be used to convert between primitive types. Consider using the `From` trait
error[E0054]: cannot cast as `bool`
--> $DIR/error-festival.rs:43:24
|
2018-02-24 17:59:34 -06:00
LL | let x_is_nonzero = x as bool;
| ^^^^^^^^^ unsupported cast
|
= help: compare with zero instead
error[E0606]: casting `&u8` as `u32` is invalid
--> $DIR/error-festival.rs:47:18
|
2018-02-24 17:59:34 -06:00
LL | let y: u32 = x as u32;
| ^^^^^^^^ cannot cast `&u8` as `u32`
|
help: did you mean `*x`?
--> $DIR/error-festival.rs:47:18
|
2018-02-24 17:59:34 -06:00
LL | let y: u32 = x as u32;
| ^
error[E0607]: cannot cast thin pointer `*const u8` to fat pointer `*const [u8]`
--> $DIR/error-festival.rs:51:5
|
2018-02-24 17:59:34 -06:00
LL | v as *const [u8];
| ^^^^^^^^^^^^^^^^
error: aborting due to 10 previous errors
2018-03-03 08:59:40 -06:00
Some errors occurred: E0054, E0368, E0425, E0599, E0600, E0603, E0604, E0605, E0606...
For more information about an error, try `rustc --explain E0054`.