about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2015-01-12 16:31:11 -0800
committerBrian Anderson <banderson@mozilla.com>2015-01-21 10:34:16 -0800
commit90aa581cff54ed1bb5f53ee2ead3764fca94fdf3 (patch)
tree2e2487396253ce6371325d9b35494108719cea99 /src
parent6869645e86c91544b8737b89809bdf10bef536d9 (diff)
downloadrust-90aa581cff54ed1bb5f53ee2ead3764fca94fdf3.tar.gz
rust-90aa581cff54ed1bb5f53ee2ead3764fca94fdf3.zip
Remove unused stability levels from compiler
Diffstat (limited to 'src')
-rw-r--r--src/librbml/lib.rs3
-rw-r--r--src/librustc/lint/builtin.rs3
-rw-r--r--src/librustdoc/html/format.rs11
-rw-r--r--src/librustdoc/stability_summary.rs17
-rw-r--r--src/libsyntax/attr.rs6
5 files changed, 8 insertions, 32 deletions
diff --git a/src/librbml/lib.rs b/src/librbml/lib.rs
index 25279796c03..8fcd753b4a8 100644
--- a/src/librbml/lib.rs
+++ b/src/librbml/lib.rs
@@ -845,7 +845,10 @@ pub mod writer {
 
     // Set to true to generate more debugging in EBML code.
     // Totally lame approach.
+    #[cfg(not(ndebug))]
     static DEBUG: bool = true;
+    #[cfg(ndebug)]
+    static DEBUG: bool = false;
 
     impl<'a, W: Writer + Seek> Encoder<'a, W> {
         // used internally to emit things like the vector length and so on
diff --git a/src/librustc/lint/builtin.rs b/src/librustc/lint/builtin.rs
index 8a27cfc510f..314cde10014 100644
--- a/src/librustc/lint/builtin.rs
+++ b/src/librustc/lint/builtin.rs
@@ -660,9 +660,6 @@ impl LintPass for UnusedAttributes {
             // FIXME: #14407 these are only looked at on-demand so we can't
             // guarantee they'll have already been checked
             "deprecated",
-            "experimental",
-            "frozen",
-            "locked",
             "must_use",
             "stable",
             "unstable",
diff --git a/src/librustdoc/html/format.rs b/src/librustdoc/html/format.rs
index 57b8d666c95..ad13ab59c03 100644
--- a/src/librustdoc/html/format.rs
+++ b/src/librustdoc/html/format.rs
@@ -765,9 +765,6 @@ impl fmt::String for ModuleSummary {
             try!(write!(f, "<span class='summary Unstable' \
                             style='width: {:.4}%; display: inline-block'>&nbsp</span>",
                         (100 * cnt.unstable) as f64/tot as f64));
-            try!(write!(f, "<span class='summary Experimental' \
-                            style='width: {:.4}%; display: inline-block'>&nbsp</span>",
-                        (100 * cnt.experimental) as f64/tot as f64));
             try!(write!(f, "<span class='summary Deprecated' \
                             style='width: {:.4}%; display: inline-block'>&nbsp</span>",
                         (100 * cnt.deprecated) as f64/tot as f64));
@@ -786,12 +783,11 @@ impl fmt::String for ModuleSummary {
         let mut context = Vec::new();
 
         let tot = self.counts.total();
-        let (stable, unstable, experimental, deprecated, unmarked) = if tot == 0 {
-            (0, 0, 0, 0, 0)
+        let (stable, unstable, deprecated, unmarked) = if tot == 0 {
+            (0, 0, 0, 0)
         } else {
             ((100 * self.counts.stable)/tot,
              (100 * self.counts.unstable)/tot,
-             (100 * self.counts.experimental)/tot,
              (100 * self.counts.deprecated)/tot,
              (100 * self.counts.unmarked)/tot)
         };
@@ -804,13 +800,12 @@ its children (percentages total for {name}):
 <blockquote>
 <a class='stability Stable'></a> stable ({}%),<br/>
 <a class='stability Unstable'></a> unstable ({}%),<br/>
-<a class='stability Experimental'></a> experimental ({}%),<br/>
 <a class='stability Deprecated'></a> deprecated ({}%),<br/>
 <a class='stability Unmarked'></a> unmarked ({}%)
 </blockquote>
 The counts do not include methods or trait
 implementations that are visible only through a re-exported type.",
-stable, unstable, experimental, deprecated, unmarked,
+stable, unstable, deprecated, unmarked,
 name=self.name));
         try!(write!(f, "<table>"));
         try!(fmt_inner(f, &mut context, self));
diff --git a/src/librustdoc/stability_summary.rs b/src/librustdoc/stability_summary.rs
index 451dbce568e..b03b3239dab 100644
--- a/src/librustdoc/stability_summary.rs
+++ b/src/librustdoc/stability_summary.rs
@@ -16,7 +16,7 @@
 use std::cmp::Ordering;
 use std::ops::Add;
 
-use syntax::attr::{Deprecated, Experimental, Unstable, Stable, Frozen, Locked};
+use syntax::attr::{Deprecated, Unstable, Stable};
 use syntax::ast::Public;
 
 use clean::{Crate, Item, ModuleItem, Module, EnumItem, Enum};
@@ -30,11 +30,8 @@ use html::render::cache;
 #[derive(Copy)]
 pub struct Counts {
     pub deprecated: uint,
-    pub experimental: uint,
     pub unstable: uint,
     pub stable: uint,
-    pub frozen: uint,
-    pub locked: uint,
 
     /// No stability level, inherited or otherwise.
     pub unmarked: uint,
@@ -46,11 +43,8 @@ impl Add for Counts {
     fn add(self, other: Counts) -> Counts {
         Counts {
             deprecated:   self.deprecated   + other.deprecated,
-            experimental: self.experimental + other.experimental,
             unstable:     self.unstable     + other.unstable,
             stable:       self.stable       + other.stable,
-            frozen:       self.frozen       + other.frozen,
-            locked:       self.locked       + other.locked,
             unmarked:     self.unmarked     + other.unmarked,
         }
     }
@@ -60,18 +54,14 @@ impl Counts {
     fn zero() -> Counts {
         Counts {
             deprecated:   0,
-            experimental: 0,
             unstable:     0,
             stable:       0,
-            frozen:       0,
-            locked:       0,
             unmarked:     0,
         }
     }
 
     pub fn total(&self) -> uint {
-        self.deprecated + self.experimental + self.unstable + self.stable +
-            self.frozen + self.locked + self.unmarked
+        self.deprecated + self.unstable + self.stable + self.unmarked
     }
 }
 
@@ -109,11 +99,8 @@ fn count_stability(stab: Option<&Stability>) -> Counts {
         None             => Counts { unmarked: 1,     .. Counts::zero() },
         Some(ref stab) => match stab.level {
             Deprecated   => Counts { deprecated: 1,   .. Counts::zero() },
-            Experimental => Counts { experimental: 1, .. Counts::zero() },
             Unstable     => Counts { unstable: 1,     .. Counts::zero() },
             Stable       => Counts { stable: 1,       .. Counts::zero() },
-            Frozen       => Counts { frozen: 1,       .. Counts::zero() },
-            Locked       => Counts { locked: 1,       .. Counts::zero() },
         }
     }
 }
diff --git a/src/libsyntax/attr.rs b/src/libsyntax/attr.rs
index 6f57c06d33e..74d7ddc21c3 100644
--- a/src/libsyntax/attr.rs
+++ b/src/libsyntax/attr.rs
@@ -351,11 +351,8 @@ pub struct Stability {
 #[derive(RustcEncodable,RustcDecodable,PartialEq,PartialOrd,Clone,Show,Copy)]
 pub enum StabilityLevel {
     Deprecated,
-    Experimental,
     Unstable,
     Stable,
-    Frozen,
-    Locked
 }
 
 impl fmt::String for StabilityLevel {
@@ -372,11 +369,8 @@ pub fn find_stability_generic<'a,
     for attr in attrs {
         let level = match attr.name().get() {
             "deprecated" => Deprecated,
-            "experimental" => Experimental,
             "unstable" => Unstable,
             "stable" => Stable,
-            "frozen" => Frozen,
-            "locked" => Locked,
             _ => continue // not a stability level
         };