Skip to content

Commit 0a8a646

Browse files
committed
Prioritize libbacktrace of gimli in #[cfg]
This way you can enable libbacktrace with `features = ["libbacktrace"]` rather than having to disable default features too.
1 parent aa88e51 commit 0a8a646

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/symbolize/mod.rs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -461,15 +461,6 @@ cfg_if::cfg_if! {
461461
use self::dbghelp::resolve as resolve_imp;
462462
use self::dbghelp::Symbol as SymbolImp;
463463
unsafe fn clear_symbol_cache_imp() {}
464-
} else if #[cfg(all(
465-
feature = "gimli-symbolize",
466-
any(unix, windows),
467-
not(target_os = "emscripten"),
468-
))] {
469-
mod gimli;
470-
use self::gimli::resolve as resolve_imp;
471-
use self::gimli::Symbol as SymbolImp;
472-
use self::gimli::clear_symbol_cache as clear_symbol_cache_imp;
473464
} else if #[cfg(all(
474465
feature = "libbacktrace",
475466
any(unix, all(windows, not(target_vendor = "uwp"), target_env = "gnu")),
@@ -481,6 +472,15 @@ cfg_if::cfg_if! {
481472
use self::libbacktrace::resolve as resolve_imp;
482473
use self::libbacktrace::Symbol as SymbolImp;
483474
unsafe fn clear_symbol_cache_imp() {}
475+
} else if #[cfg(all(
476+
feature = "gimli-symbolize",
477+
any(unix, windows),
478+
not(target_os = "emscripten"),
479+
))] {
480+
mod gimli;
481+
use self::gimli::resolve as resolve_imp;
482+
use self::gimli::Symbol as SymbolImp;
483+
use self::gimli::clear_symbol_cache as clear_symbol_cache_imp;
484484
} else {
485485
mod noop;
486486
use self::noop::resolve as resolve_imp;

0 commit comments

Comments
 (0)