-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 unneeded prelude imports in libcore tests #66894
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These three lines are from c82da7a in 2015. They cause problems when applying rustfmt to the codebase, because reordering wildcard imports can trigger new unused import warnings. As a minimized example, the following program compiles successfully: #![deny(unused_imports)] use std::fmt::Debug; use std::marker::Send; pub mod repro { use std::prelude::v1::*; use super::*; pub type D = dyn Debug; pub type S = dyn Send; } pub type S = dyn Send; but putting it through rustfmt produces a program that fails to compile: #![deny(unused_imports)] use std::fmt::Debug; use std::marker::Send; pub mod repro { use super::*; use std::prelude::v1::*; pub type D = dyn Debug; pub type S = dyn Send; } pub type S = dyn Send; The error is: error: unused import: `std::prelude::v1::*` --> src/main.rs:8:9 | 8 | use std::prelude::v1::*; | ^^^^^^^^^^^^^^^^^^^
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
label
Nov 30, 2019
📌 Commit f34990e has been approved by |
bors
added
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed
S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
Nov 30, 2019
Chocolatey is down so the Windows build isn't going to work. |
^--- @bors treeclosed=1000 |
Centril
added a commit
to Centril/rust
that referenced
this pull request
Nov 30, 2019
Remove unneeded prelude imports in libcore tests These three lines are from c82da7a dating back to 2015. They cause problems when applying rustfmt to the codebase, because reordering wildcard imports can trigger new unused import warnings. As a minimized example, the following program compiles successfully: ```rust #![deny(unused_imports)] use std::fmt::Debug; use std::marker::Send; pub mod repro { use std::prelude::v1::*; use super::*; pub type D = dyn Debug; pub type S = dyn Send; } pub type S = dyn Send; ``` but putting it through rustfmt produces a program that fails to compile: ```rust #![deny(unused_imports)] use std::fmt::Debug; use std::marker::Send; pub mod repro { use super::*; use std::prelude::v1::*; pub type D = dyn Debug; pub type S = dyn Send; } pub type S = dyn Send; ``` The error is: ```console error: unused import: `std::prelude::v1::*` --> src/main.rs:8:9 | 8 | use std::prelude::v1::*; | ^^^^^^^^^^^^^^^^^^^ ```
bors
added a commit
that referenced
this pull request
Dec 1, 2019
Rollup of 9 pull requests Successful merges: - #66612 (Initial implementation of or-pattern usefulness checking) - #66705 (Atomic as_mut_ptr) - #66759 (impl TrustedLen for vec::Drain) - #66858 (Use LLVMAddAnalysisPasses instead of Rust's wrapper) - #66870 (SimplifyArmIdentity only for locals with the same type) - #66883 (rustc_typeck: gate AnonConst's generics on feature(const_generics).) - #66889 (Make python-generated source files compatible with rustfmt) - #66894 (Remove unneeded prelude imports in libcore tests) - #66895 (Feature gating *declarations* => new crate `rustc_feature`) Failed merges: - #66905 (rustc_plugin: Remove some remaining plugin features) r? @ghost
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These three lines are from c82da7a dating back to 2015.
They cause problems when applying rustfmt to the codebase, because reordering wildcard imports can trigger new unused import warnings.
As a minimized example, the following program compiles successfully:
but putting it through rustfmt produces a program that fails to compile:
The error is: