Skip to content

Could we change the Rust fmt configuration for import collapsing? #714

Description

@ErisianArchitect

If you're not sure what I mean by import collapsing, I'm talking about how use statements can go from

use core::{
    ptr::{
        NonNull,
    },
};

into

use core::ptr::NonNull;

This is also what causes the llvm-sys imports to form a large block that is harder to read, and harder to update.
I was thinking it would be much nicer if we turned this behavior off, or changed the behavior, since we work with a lot of imports. While working on orc2, I'm getting frustrated by that mechanism because I like to keep my use statements in a way that makes them easy to modify, but the collapsed version is much more difficult to modify, especially since I often have to add in braces when they are removed.

Alternative:

I could also just add rust_fmt::skip to my use statements until I'm ready to make a PR, but then I might forget to remove those attributes.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions