In a library crate I want to make backtraces available on demand and use the Rust nightly backtrace feature. In order to do that, Rust requires setting #![feature(backtrace)] in my crate root.
Is there a way to express I want Rust nightly feature "backtrace" only when my create level feature "backtraces" is set?
Non compiling pseudo code to help illustrating what I have in mind:
#[cfg(feature = "backtraces")]
#![feature(backtrace)]