Skip to content

Commit 29bbfab

Browse files
authored
fix: Ensure mod unwind_unimplemented works without nightly feature enabled (#150)
* fix: Ensure `nightly` feature doesn't force `unwinding` * chore: `nightly` feature should still enable `unwinding` as a feature
1 parent 160185d commit 29bbfab

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,12 @@ pub(crate) mod naked;
3737
#[cfg(all(feature = "unwinding", not(target_arch = "arm")))]
3838
#[allow(unused_extern_crates)]
3939
extern crate unwinding;
40-
#[cfg(all(feature = "unwinding", target_arch = "arm"))]
40+
#[cfg(any(not(feature = "unwinding"), target_arch = "arm"))]
4141
mod unwind_unimplemented;
42+
// If we don't have "unwinding", provide stub functions for unwinding and
43+
// panicking.
44+
#[cfg(not(feature = "unwinding"))]
45+
mod stubs;
4246

4347
#[cfg_attr(target_arch = "aarch64", path = "arch/aarch64.rs")]
4448
#[cfg_attr(target_arch = "x86_64", path = "arch/x86_64.rs")]
@@ -66,11 +70,6 @@ pub mod signal;
6670
#[cfg_attr(not(feature = "take-charge"), path = "thread/libc.rs")]
6771
pub mod thread;
6872

69-
// If we don't have "unwinding", provide stub functions for unwinding and
70-
// panicking.
71-
#[cfg(not(feature = "unwinding"))]
72-
mod stubs;
73-
7473
// Include definitions of `memcpy` and other functions called from LLVM
7574
// Codegen. Normally, these would be defined by the platform libc, however with
7675
// origin with `take-charge`, there is no libc. Otherwise normally, these

0 commit comments

Comments
 (0)