@@ -911,28 +911,28 @@ pub fn get_arg_name(pat: &Pat) -> Option<ast::Name> {
911
911
}
912
912
}
913
913
914
- pub fn int_bits ( tcx : TyCtxt < ' _ , ' _ > , ity : ast:: IntTy ) -> u64 {
914
+ pub fn int_bits ( tcx : TyCtxt < ' _ > , ity : ast:: IntTy ) -> u64 {
915
915
layout:: Integer :: from_attr ( & tcx, attr:: IntType :: SignedInt ( ity) )
916
916
. size ( )
917
917
. bits ( )
918
918
}
919
919
920
920
#[ allow( clippy:: cast_possible_wrap) ]
921
921
/// Turn a constant int byte representation into an i128
922
- pub fn sext ( tcx : TyCtxt < ' _ , ' _ > , u : u128 , ity : ast:: IntTy ) -> i128 {
922
+ pub fn sext ( tcx : TyCtxt < ' _ > , u : u128 , ity : ast:: IntTy ) -> i128 {
923
923
let amt = 128 - int_bits ( tcx, ity) ;
924
924
( ( u as i128 ) << amt) >> amt
925
925
}
926
926
927
927
#[ allow( clippy:: cast_sign_loss) ]
928
928
/// clip unused bytes
929
- pub fn unsext ( tcx : TyCtxt < ' _ , ' _ > , u : i128 , ity : ast:: IntTy ) -> u128 {
929
+ pub fn unsext ( tcx : TyCtxt < ' _ > , u : i128 , ity : ast:: IntTy ) -> u128 {
930
930
let amt = 128 - int_bits ( tcx, ity) ;
931
931
( ( u as u128 ) << amt) >> amt
932
932
}
933
933
934
934
/// clip unused bytes
935
- pub fn clip ( tcx : TyCtxt < ' _ , ' _ > , u : u128 , ity : ast:: UintTy ) -> u128 {
935
+ pub fn clip ( tcx : TyCtxt < ' _ > , u : u128 , ity : ast:: UintTy ) -> u128 {
936
936
let bits = layout:: Integer :: from_attr ( & tcx, attr:: IntType :: UnsignedInt ( ity) )
937
937
. size ( )
938
938
. bits ( ) ;
@@ -973,7 +973,7 @@ pub fn without_block_comments(lines: Vec<&str>) -> Vec<&str> {
973
973
without
974
974
}
975
975
976
- pub fn any_parent_is_automatically_derived ( tcx : TyCtxt < ' _ , ' _ > , node : HirId ) -> bool {
976
+ pub fn any_parent_is_automatically_derived ( tcx : TyCtxt < ' _ > , node : HirId ) -> bool {
977
977
let map = & tcx. hir ( ) ;
978
978
let mut prev_enclosing_node = None ;
979
979
let mut enclosing_node = node;
0 commit comments