This fails on stable because rust still parses the unstable module: ``` rust #[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: ``` rust #[cfg(feature = "unstable")] macro_rules! decl_unstable { () => { mod unstable { fn foo() -> impl Foo {} } } } #[cfg(not(feature = "unstable"))] macro_rules! decl_unstable { () => {} } decl_unstable!(); ```