about summary refs log tree commit diff
path: root/src/libstd
diff options
context:
space:
mode:
Diffstat (limited to 'src/libstd')
-rw-r--r--src/libstd/termination.rs15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/libstd/termination.rs b/src/libstd/termination.rs
index 93a913bb540..dc7fa53aab6 100644
--- a/src/libstd/termination.rs
+++ b/src/libstd/termination.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use error::Error;
+use fmt::Debug;
 #[cfg(target_arch = "wasm32")]
 mod exit {
     pub const SUCCESS: i32 = 0;
@@ -45,12 +45,12 @@ impl Termination for () {
 }
 
 #[unstable(feature = "termination_trait", issue = "43301")]
-impl<T: Termination, E: Error> Termination for Result<T, E> {
+impl<T: Termination, E: Debug> Termination for Result<T, E> {
     fn report(self) -> i32 {
         match self {
             Ok(val) => val.report(),
             Err(err) => {
-                print_error(err);
+                eprintln!("Error: {:?}", err);
                 exit::FAILURE
             }
         }
@@ -58,15 +58,6 @@ impl<T: Termination, E: Error> Termination for Result<T, E> {
 }
 
 #[unstable(feature = "termination_trait", issue = "43301")]
-fn print_error<E: Error>(err: E) {
-    eprintln!("Error: {}", err.description());
-
-    if let Some(ref err) = err.cause() {
-        eprintln!("Caused by: {}", err.description());
-    }
-}
-
-#[unstable(feature = "termination_trait", issue = "43301")]
 impl Termination for ! {
     fn report(self) -> i32 { unreachable!(); }
 }