@@ -167,13 +167,6 @@ pub enum GenericArgs {
167167}
168168
169169impl GenericArgs {
170- pub fn is_parenthesized ( & self ) -> bool {
171- match * self {
172- Parenthesized ( ..) => true ,
173- _ => false ,
174- }
175- }
176-
177170 pub fn is_angle_bracketed ( & self ) -> bool {
178171 match * self {
179172 AngleBracketed ( ..) => true ,
@@ -857,13 +850,6 @@ impl BinOpKind {
857850 }
858851 }
859852
860- pub fn is_shift ( & self ) -> bool {
861- match * self {
862- BinOpKind :: Shl | BinOpKind :: Shr => true ,
863- _ => false ,
864- }
865- }
866-
867853 pub fn is_comparison ( & self ) -> bool {
868854 use BinOpKind :: * ;
869855 // Note for developers: please keep this as is;
@@ -873,11 +859,6 @@ impl BinOpKind {
873859 And | Or | Add | Sub | Mul | Div | Rem | BitXor | BitAnd | BitOr | Shl | Shr => false ,
874860 }
875861 }
876-
877- /// Returns `true` if the binary operator takes its arguments by value
878- pub fn is_by_value ( & self ) -> bool {
879- !self . is_comparison ( )
880- }
881862}
882863
883864pub type BinOp = Spanned < BinOpKind > ;
@@ -896,14 +877,6 @@ pub enum UnOp {
896877}
897878
898879impl UnOp {
899- /// Returns `true` if the unary operator takes its argument by value
900- pub fn is_by_value ( u : UnOp ) -> bool {
901- match u {
902- UnOp :: Neg | UnOp :: Not => true ,
903- _ => false ,
904- }
905- }
906-
907880 pub fn to_string ( op : UnOp ) -> & ' static str {
908881 match op {
909882 UnOp :: Deref => "*" ,
@@ -1753,13 +1726,6 @@ impl IntTy {
17531726 }
17541727 }
17551728
1756- pub fn val_to_string ( & self , val : i128 ) -> String {
1757- // Cast to a `u128` so we can correctly print `INT128_MIN`. All integral types
1758- // are parsed as `u128`, so we wouldn't want to print an extra negative
1759- // sign.
1760- format ! ( "{}{}" , val as u128 , self . name_str( ) )
1761- }
1762-
17631729 pub fn bit_width ( & self ) -> Option < u64 > {
17641730 Some ( match * self {
17651731 IntTy :: Isize => return None ,
@@ -1818,10 +1784,6 @@ impl UintTy {
18181784 }
18191785 }
18201786
1821- pub fn val_to_string ( & self , val : u128 ) -> String {
1822- format ! ( "{}{}" , val, self . name_str( ) )
1823- }
1824-
18251787 pub fn bit_width ( & self ) -> Option < u64 > {
18261788 Some ( match * self {
18271789 UintTy :: Usize => return None ,
0 commit comments