Fix fn_to_numeric_cast 32 bit stderr
This commit is contained in:
parent
ca4557c692
commit
72fc40c3d0
1 changed files with 23 additions and 23 deletions
|
|
@ -1,5 +1,5 @@
|
|||
error: casting function pointer `foo` to `i8`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:12:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:13:13
|
||||
|
|
||||
LL | let _ = foo as i8;
|
||||
| ^^^^^^^^^ help: try: `foo as usize`
|
||||
|
|
@ -8,13 +8,13 @@ LL | let _ = foo as i8;
|
|||
= help: to override `-D warnings` add `#[allow(clippy::fn_to_numeric_cast_with_truncation)]`
|
||||
|
||||
error: casting function pointer `foo` to `i16`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:14:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:15:13
|
||||
|
|
||||
LL | let _ = foo as i16;
|
||||
| ^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `i32`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:16:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:17:13
|
||||
|
|
||||
LL | let _ = foo as i32;
|
||||
| ^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
|
@ -23,121 +23,121 @@ LL | let _ = foo as i32;
|
|||
= help: to override `-D warnings` add `#[allow(clippy::fn_to_numeric_cast)]`
|
||||
|
||||
error: casting function pointer `foo` to `i64`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:19:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:20:13
|
||||
|
|
||||
LL | let _ = foo as i64;
|
||||
| ^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `i128`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:21:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:22:13
|
||||
|
|
||||
LL | let _ = foo as i128;
|
||||
| ^^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `isize`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:23:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:24:13
|
||||
|
|
||||
LL | let _ = foo as isize;
|
||||
| ^^^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `u8`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:26:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:27:13
|
||||
|
|
||||
LL | let _ = foo as u8;
|
||||
| ^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `u16`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:28:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:29:13
|
||||
|
|
||||
LL | let _ = foo as u16;
|
||||
| ^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `u32`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:30:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:31:13
|
||||
|
|
||||
LL | let _ = foo as u32;
|
||||
| ^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `u64`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:33:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:34:13
|
||||
|
|
||||
LL | let _ = foo as u64;
|
||||
| ^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `foo` to `u128`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:35:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:36:13
|
||||
|
|
||||
LL | let _ = foo as u128;
|
||||
| ^^^^^^^^^^^ help: try: `foo as usize`
|
||||
|
||||
error: casting function pointer `abc` to `i8`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:49:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:50:13
|
||||
|
|
||||
LL | let _ = abc as i8;
|
||||
| ^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `i16`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:51:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:52:13
|
||||
|
|
||||
LL | let _ = abc as i16;
|
||||
| ^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `i32`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:53:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:54:13
|
||||
|
|
||||
LL | let _ = abc as i32;
|
||||
| ^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `i64`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:56:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:57:13
|
||||
|
|
||||
LL | let _ = abc as i64;
|
||||
| ^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `i128`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:58:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:59:13
|
||||
|
|
||||
LL | let _ = abc as i128;
|
||||
| ^^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `isize`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:60:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:61:13
|
||||
|
|
||||
LL | let _ = abc as isize;
|
||||
| ^^^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `u8`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:63:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:64:13
|
||||
|
|
||||
LL | let _ = abc as u8;
|
||||
| ^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `u16`, which truncates the value
|
||||
--> tests/ui/fn_to_numeric_cast.rs:65:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:66:13
|
||||
|
|
||||
LL | let _ = abc as u16;
|
||||
| ^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `u32`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:67:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:68:13
|
||||
|
|
||||
LL | let _ = abc as u32;
|
||||
| ^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `u64`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:70:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:71:13
|
||||
|
|
||||
LL | let _ = abc as u64;
|
||||
| ^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `abc` to `u128`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:72:13
|
||||
--> tests/ui/fn_to_numeric_cast.rs:73:13
|
||||
|
|
||||
LL | let _ = abc as u128;
|
||||
| ^^^^^^^^^^^ help: try: `abc as usize`
|
||||
|
||||
error: casting function pointer `f` to `i32`
|
||||
--> tests/ui/fn_to_numeric_cast.rs:80:5
|
||||
--> tests/ui/fn_to_numeric_cast.rs:81:5
|
||||
|
|
||||
LL | f as i32
|
||||
| ^^^^^^^^ help: try: `f as usize`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue