diff --git a/library/std/src/time.rs b/library/std/src/time.rs index 575882eb459..18e38c6299b 100644 --- a/library/std/src/time.rs +++ b/library/std/src/time.rs @@ -460,12 +460,13 @@ impl SystemTime { /// /// # Examples /// - /// ``` + /// ```no_run /// use std::time::SystemTime; /// /// let sys_time = SystemTime::now(); - /// let difference = sys_time.duration_since(sys_time) - /// .expect("Clock may have gone backwards"); + /// let new_sys_time = SystemTime::now(); + /// let difference = new_sys_time.duration_since(sys_time) + /// .expect("Clock may have gone backwards"); /// println!("{:?}", difference); /// ``` #[stable(feature = "time2", since = "1.8.0")]