about summary refs log tree commit diff
path: root/src/libstd/time
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-03-07 15:42:29 -0800
committerAlex Crichton <alex@alexcrichton.com>2016-03-12 12:31:13 -0800
commitb53764c73bd722ea22142bace6249d5950066253 (patch)
treeecf0066dbdb65bf0cf4600c4560d06edcacff707 /src/libstd/time
parent083db64d9050ae6f92628aa869171ac4affb016f (diff)
std: Clean out deprecated APIs
Removes all unstable and deprecated APIs prior to the 1.8 release. All APIs that
are deprecated in the 1.8 release are sticking around for the rest of this
cycle.

Some notable changes are:

* The `dynamic_lib` module was moved into `rustc_back` as the compiler still
  relies on a few bits and pieces.
* The `DebugTuple` formatter now special-cases an empty struct name with only
  one field to append a trailing comma.
Diffstat (limited to 'src/libstd/time')
-rw-r--r--src/libstd/time/duration.rs16
1 files changed, 0 insertions, 16 deletions
diff --git a/src/libstd/time/duration.rs b/src/libstd/time/duration.rs
index 7ecb3920cc8..7c3240b4a40 100644
--- a/src/libstd/time/duration.rs
+++ b/src/libstd/time/duration.rs
@@ -9,7 +9,6 @@
 // except according to those terms.
 
 use ops::{Add, Sub, Mul, Div};
-use time::Instant;
 
 const NANOS_PER_SEC: u32 = 1_000_000_000;
 const NANOS_PER_MILLI: u32 = 1_000_000;
@@ -59,21 +58,6 @@ impl Duration {
         Duration { secs: secs, nanos: nanos }
     }
 
-    /// Runs a closure, returning the duration of time it took to run the
-    /// closure.
-    #[unstable(feature = "duration_span",
-               reason = "unsure if this is the right API or whether it should \
-                         wait for a more general \"moment in time\" \
-                         abstraction",
-               issue = "27799")]
-    #[rustc_deprecated(reason = "use std::time::Instant instead",
-                       since = "1.6.0")]
-    pub fn span<F>(f: F) -> Duration where F: FnOnce() {
-        let start = Instant::now();
-        f();
-        start.elapsed()
-    }
-
     /// Creates a new `Duration` from the specified number of seconds.
     #[stable(feature = "duration", since = "1.3.0")]
     pub fn from_secs(secs: u64) -> Duration {