Skip to content

Blocks for items #1991

Closed
Closed
@clarfonthey

Description

@clarfonthey

It'd be really nice if we could do something like:

#[cfg(feature = "abc")]
{
    extern crate x;
    extern crate y;
    mod z;
    use z::{a, b, c};
}

Right now, we have to attach the attribute to every item, which is a bit redundant. We can put things in a module and then re-export them, but it'd be nice if we could do something like this instead.

Metadata

Metadata

Assignees

No one assigned

    Labels

    T-langRelevant to the language team, which will review and decide on the RFC.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions