1- //@revisions: 32bit 64bit
2- //@[32bit ]ignore-bitwidth: 64
3- //@[64bit ]ignore-bitwidth: 32
1+ //@revisions: r32bit r64bit
2+ //@[r32bit ]ignore-bitwidth: 64
3+ //@[r64bit ]ignore-bitwidth: 32
44//@no-rustfix
55#![ warn( clippy:: fn_to_numeric_cast, clippy:: fn_to_numeric_cast_with_truncation) ]
66#![ allow( function_casts_as_integer) ]
@@ -15,8 +15,8 @@ fn test_function_to_numeric_cast() {
1515 let _ = foo as i16 ;
1616 //~^ fn_to_numeric_cast_with_truncation
1717 let _ = foo as i32 ;
18- //~[64bit ]^ fn_to_numeric_cast_with_truncation
19- //~[32bit ]^^ fn_to_numeric_cast
18+ //~[r64bit ]^ fn_to_numeric_cast_with_truncation
19+ //~[r32bit ]^^ fn_to_numeric_cast
2020 let _ = foo as i64 ;
2121 //~^ fn_to_numeric_cast
2222 let _ = foo as i128 ;
@@ -29,8 +29,8 @@ fn test_function_to_numeric_cast() {
2929 let _ = foo as u16 ;
3030 //~^ fn_to_numeric_cast_with_truncation
3131 let _ = foo as u32 ;
32- //~[64bit ]^ fn_to_numeric_cast_with_truncation
33- //~[32bit ]^^ fn_to_numeric_cast
32+ //~[r64bit ]^ fn_to_numeric_cast_with_truncation
33+ //~[r32bit ]^^ fn_to_numeric_cast
3434 let _ = foo as u64 ;
3535 //~^ fn_to_numeric_cast
3636 let _ = foo as u128 ;
@@ -52,8 +52,8 @@ fn test_function_var_to_numeric_cast() {
5252 let _ = abc as i16 ;
5353 //~^ fn_to_numeric_cast_with_truncation
5454 let _ = abc as i32 ;
55- //~[64bit ]^ fn_to_numeric_cast_with_truncation
56- //~[32bit ]^^ fn_to_numeric_cast
55+ //~[r64bit ]^ fn_to_numeric_cast_with_truncation
56+ //~[r32bit ]^^ fn_to_numeric_cast
5757 let _ = abc as i64 ;
5858 //~^ fn_to_numeric_cast
5959 let _ = abc as i128 ;
@@ -66,8 +66,8 @@ fn test_function_var_to_numeric_cast() {
6666 let _ = abc as u16 ;
6767 //~^ fn_to_numeric_cast_with_truncation
6868 let _ = abc as u32 ;
69- //~[64bit ]^ fn_to_numeric_cast_with_truncation
70- //~[32bit ]^^ fn_to_numeric_cast
69+ //~[r64bit ]^ fn_to_numeric_cast_with_truncation
70+ //~[r32bit ]^^ fn_to_numeric_cast
7171 let _ = abc as u64 ;
7272 //~^ fn_to_numeric_cast
7373 let _ = abc as u128 ;
@@ -79,8 +79,8 @@ fn test_function_var_to_numeric_cast() {
7979
8080fn fn_with_fn_args ( f : fn ( i32 ) -> i32 ) -> i32 {
8181 f as i32
82- //~[64bit ]^ fn_to_numeric_cast_with_truncation
83- //~[32bit ]^^ fn_to_numeric_cast
82+ //~[r64bit ]^ fn_to_numeric_cast_with_truncation
83+ //~[r32bit ]^^ fn_to_numeric_cast
8484}
8585
8686fn main ( ) { }
0 commit comments