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 statments #4860

Closed
burdges opened this issue Jun 3, 2021 · 1 comment
Closed

Group use statments #4860

burdges opened this issue Jun 3, 2021 · 1 comment

Comments

@burdges
Copy link

burdges commented Jun 3, 2021

A larger project should group their use statements semantically with blank lines between groups, so std/core first, crates.io second, crates in same repo third, and imports from the same crate last, and alphabetical within groups.

use core::{..};
#[cfg(alloc)]
use alloc::{..}

use arrayref::ArrayRef;
use rand::thread_rng;

use sister_crate::foo;

use my_sub::bar;
use super::baz;
@calebcartwright
Copy link
Member

Closing as a duplicate because there is already an existing group_imports configuration option, and the associated limitations/feature requests are discussed in several open issues (e.g. #4693, #4709)

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

No branches or pull requests

2 participants