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

Formatting single self in use declarations #6144

Closed
rvql opened this issue Apr 11, 2024 · 2 comments
Closed

Formatting single self in use declarations #6144

rvql opened this issue Apr 11, 2024 · 2 comments

Comments

@rvql
Copy link

rvql commented Apr 11, 2024

When formatting the following code with rustfmt 1.7.0-stable (25ef9e3 2024-04-09)

use std::str::{self};

I'm expecting

use std::str;

but the code is unchanged. I'm not sure if this is by design.

@ytmimi
Copy link
Contributor

ytmimi commented Apr 11, 2024

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

This is also a duplicate of the already closed #6129

@rvql
Copy link
Author

rvql commented Apr 12, 2024

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

This is also a duplicate of the already closed #6129

Thanks for the clarification.

@rvql rvql closed this as completed Apr 12, 2024
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