summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-22 16:14:25 +0000
committerbors <bors@rust-lang.org>2015-08-22 16:14:25 +0000
commit258f3030ab62d35f568a8f32f65da8990c568dbd (patch)
treefdb0283047da9d9b1c8dd35290a17af3ea59936b /src/libsyntax
parentbc4df4ca3fdcc24f0fc09f8df63024752f57a8b0 (diff)
parent9d7c84d3b8e6b275be378cdfdec2033b3bdcea6d (diff)
downloadrust-258f3030ab62d35f568a8f32f65da8990c568dbd.tar.gz
rust-258f3030ab62d35f568a8f32f65da8990c568dbd.zip
Auto merge of #27913 - birkenfeld:remove_suffix_len, r=alexcrichton
The methods gave wrong results for TyIs and TyUs, whose suffix len
should be 5 nowadays.  But since they were only used for parsing,
and unneeded for that since 606a309d, remove them rather than fixing.

I hope this is ok to do, since all of rustc is considered unstable...
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/ast.rs27
1 files changed, 0 insertions, 27 deletions
diff --git a/src/libsyntax/ast.rs b/src/libsyntax/ast.rs
index 2d72c8fe2a4..cd0705f543b 100644
--- a/src/libsyntax/ast.rs
+++ b/src/libsyntax/ast.rs
@@ -1216,16 +1216,6 @@ pub enum LitIntType {
     UnsuffixedIntLit(Sign)
 }
 
-impl LitIntType {
-    pub fn suffix_len(&self) -> usize {
-        match *self {
-            UnsuffixedIntLit(_) => 0,
-            SignedIntLit(s, _) => s.suffix_len(),
-            UnsignedIntLit(u) => u.suffix_len()
-        }
-    }
-}
-
 #[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash, Debug)]
 pub enum Lit_ {
     /// A string literal (`"foo"`)
@@ -1333,12 +1323,6 @@ impl fmt::Display for IntTy {
 }
 
 impl IntTy {
-    pub fn suffix_len(&self) -> usize {
-        match *self {
-            TyIs | TyI8 => 2,
-            TyI16 | TyI32 | TyI64  => 3,
-        }
-    }
     pub fn bit_width(&self) -> Option<usize> {
         Some(match *self {
             TyIs => return None,
@@ -1360,12 +1344,6 @@ pub enum UintTy {
 }
 
 impl UintTy {
-    pub fn suffix_len(&self) -> usize {
-        match *self {
-            TyUs | TyU8 => 2,
-            TyU16 | TyU32 | TyU64  => 3,
-        }
-    }
     pub fn bit_width(&self) -> Option<usize> {
         Some(match *self {
             TyUs => return None,
@@ -1408,11 +1386,6 @@ impl fmt::Display for FloatTy {
 }
 
 impl FloatTy {
-    pub fn suffix_len(&self) -> usize {
-        match *self {
-            TyF32 | TyF64 => 3, // add F128 handling here
-        }
-    }
     pub fn bit_width(&self) -> usize {
         match *self {
             TyF32 => 32,