fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
739 B17 linesraw
1error[E0605]: non-primitive cast: `&&[i32; 1]` as `&[_]`
2  --> $DIR/issue-73886.rs:2:13
3   |
4LL |     let _ = &&[0] as &[_];
5   |             ^^^^^^^^^^^^^ an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
6
7error[E0605]: non-primitive cast: `u32` as `Option<_>`
8  --> $DIR/issue-73886.rs:4:13
9   |
10LL |     let _ = 7u32 as Option<_>;
11   |             ^^^^^^^^^^^^^^^^^ help: consider using the `From` trait instead: `Option<_>::from(7u32)`
12   |
13   = note: an `as` expression can only be used to convert between primitive types or to coerce to a specific trait object
14
15error: aborting due to 2 previous errors
16
17For more information about this error, try `rustc --explain E0605`.