Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

group use statements in block #54664

Closed
flip111 opened this issue Sep 29, 2018 · 2 comments
Closed

group use statements in block #54664

flip111 opened this issue Sep 29, 2018 · 2 comments

Comments

@flip111
Copy link

flip111 commented Sep 29, 2018

I have this code

#[cfg(windows)]
use winapi::ctypes::c_int;

#[cfg(windows)]
use winapi::shared::minwindef::WPARAM;

(and more)

I rather write this code

#[cfg(windows)]
{
    use winapi::ctypes::c_int;
    use winapi::shared::minwindef::WPARAM;
}
@petrochenkov
Copy link
Contributor

#[cfg(windows)]
use {
    winapi::ctypes::c_int,
    winapi::shared::minwindef::WPARAM,
};

works right now.

Blocks at module level in general is an open RFC - rust-lang/rfcs#2377.

@flip111
Copy link
Author

flip111 commented Sep 29, 2018

Sorry i asked about this on irc and looked in docs but couldn't find

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants