Closed
Description
This fails on stable because rust still parses the unstable module:
#[cfg(feature = "unstable")]
mod unstable {
fn foo() -> impl Foo {}
}
It's possible to work around this by conditionally defining a macro and then having the macro define the module but that's a bit messy:
#[cfg(feature = "unstable")]
macro_rules! decl_unstable {
() => {
mod unstable {
fn foo() -> impl Foo {}
}
}
}
#[cfg(not(feature = "unstable"))]
macro_rules! decl_unstable {
() => {}
}
decl_unstable!();
Metadata
Metadata
Assignees
Labels
No labels