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

Use statement: self stays inside braces #6129

Closed
Oughie opened this issue Mar 29, 2024 · 1 comment
Closed

Use statement: self stays inside braces #6129

Oughie opened this issue Mar 29, 2024 · 1 comment
Labels

Comments

@Oughie
Copy link

Oughie commented Mar 29, 2024

Consider the following example:

use std::io::{self};

rustfmt does not modify this.
Instead, it should automatically turn into:

use std::io;

@Oughie Oughie changed the title useelf stays inside braces. Use statement: self stays inside braces. Mar 29, 2024
@Oughie Oughie changed the title Use statement: self stays inside braces. Use statement: self stays inside braces Mar 29, 2024
@Oughie Oughie changed the title Use statement: self stays inside braces Use statement: self stays inside braces Mar 29, 2024
@ytmimi
Copy link
Contributor

ytmimi commented Mar 29, 2024

@Oughie To the best of my knowledge use std::io::{self}; and use std::io; are semantically different. See #3750 as an example. That's why rustfmt doesn't modify the code.

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

No branches or pull requests

2 participants