about summary refs log tree commit diff
path: root/src/libstd/rt.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-09-25 06:43:49 -0700
committerAlex Crichton <alex@alexcrichton.com>2019-09-25 06:43:49 -0700
commit1d06058a77beffb6347c77b51e12889b7bd9fc76 (patch)
tree2eb3a1feff849ef282d27852d962a81afb7559cd /src/libstd/rt.rs
parent6ef275e6c3cb1384ec78128eceeb4963ff788dca (diff)
downloadrust-1d06058a77beffb6347c77b51e12889b7bd9fc76.tar.gz
rust-1d06058a77beffb6347c77b51e12889b7bd9fc76.zip
std: Reduce checks for `feature = "backtrace"`
This is a stylistic change to libstd to reduce the number of checks of
`feature = "backtrace"` now that we unconditionally depend on the
`backtrace` crate and rely on it having an empty implementation.
otherwise.
Diffstat (limited to 'src/libstd/rt.rs')
-rw-r--r--src/libstd/rt.rs3
1 files changed, 0 insertions, 3 deletions
diff --git a/src/libstd/rt.rs b/src/libstd/rt.rs
index cf45eb0daba..63e35d5ed91 100644
--- a/src/libstd/rt.rs
+++ b/src/libstd/rt.rs
@@ -44,12 +44,9 @@ fn lang_start_internal(main: &(dyn Fn() -> i32 + Sync + crate::panic::RefUnwindS
         sys::args::init(argc, argv);
 
         // Let's run some code!
-        #[cfg(feature = "backtrace")]
         let exit_code = panic::catch_unwind(|| {
             sys_common::backtrace::__rust_begin_short_backtrace(move || main())
         });
-        #[cfg(not(feature = "backtrace"))]
-        let exit_code = panic::catch_unwind(move || main());
 
         sys_common::cleanup();
         exit_code.unwrap_or(101) as isize