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

Remove marker comments in libstd/lib.rs macro imports #70824

Merged
merged 1 commit into from Apr 6, 2020

Conversation

yoshuawuyts
Copy link
Member

@yoshuawuyts yoshuawuyts commented Apr 5, 2020

These comments were probably moved around when rustfmt was introduced. They don't correctly denote what they were intended for, so I propose we remove them instead. Thanks!

@rust-highfive
Copy link
Collaborator

rust-highfive commented Apr 5, 2020

r? @nikomatsakis

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review label Apr 5, 2020
These labels were probably moved around when rustfmt was introduced.
@yoshuawuyts yoshuawuyts force-pushed the fix-labels-in-std-macro-imports branch from c0c2073 to 004ce25 Compare Apr 5, 2020
@Mark-Simulacrum
Copy link
Member

Mark-Simulacrum commented Apr 5, 2020

I agree that they're not useful, so approving, but if rustfmt did move things around please file (on the rustfmt repository) an issue as that shouldn't happen.

@bors r+ rollup
r? @Mark-Simulacrum

@bors
Copy link
Contributor

bors commented Apr 5, 2020

📌 Commit 004ce25 has been approved by Mark-Simulacrum

@bors bors added S-waiting-on-bors and removed S-waiting-on-review labels Apr 5, 2020
@yoshuawuyts
Copy link
Member Author

yoshuawuyts commented Apr 5, 2020

@Mark-Simulacrum my guess is rustfmt alphabetized the imports when it was introduced, which messed up the semantic meaning of the the comments. This seems somewhat expected, and I'm not sure how rustfmt could have done a better job at this.

When removing the labels rustfmt likely was able to fit all imports on two lines again, so a hence the reduced line count in this patch.

@Centril
Copy link
Contributor

Centril commented Apr 5, 2020

This seems somewhat expected, and I'm not sure how rustfmt could have done a better job at this.

It could have interpreted the comments as semantic boundaries across which it is not allowed to reformat.

bors added a commit to rust-lang-ci/rust that referenced this issue Apr 5, 2020
Rollup of 7 pull requests

Successful merges:

 - rust-lang#70553 (move OS constants to platform crate)
 - rust-lang#70665 (Do not lose or reorder user-provided linker arguments)
 - rust-lang#70750 (Match options directly in the Fuse implementation)
 - rust-lang#70782 (Stop importing the float modules in documentation)
 - rust-lang#70798 ("cannot resolve" → "cannot satisfy")
 - rust-lang#70808 (Simplify dtor registration for HermitCore by using a list of destructors)
 - rust-lang#70824 (Remove marker comments in libstd/lib.rs macro imports)

Failed merges:

r? @ghost
@bors bors merged commit 23acf87 into rust-lang:master Apr 6, 2020
7 checks passed
@yoshuawuyts yoshuawuyts deleted the fix-labels-in-std-macro-imports branch Apr 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants