Anonymous `mod` / item groupers

Shall there be something like

#[cfg(feature="qqq")]
mod {
    use ...;
    struct ...
    impl ...
}

or even

#[cfg(feature="qqq")]
{
    use ...;
    struct ...
    impl ...
}

at item level?

Groups items like a module, but does not affect paths and namespacing at all, just like a bunch of items.

Got hinted on IRC that the issue already exists: https://github.com/rust-lang/rfcs/issues/1991

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.