diff options
| author | David Tolnay <dtolnay@gmail.com> | 2019-11-29 23:15:45 -0800 |
|---|---|---|
| committer | David Tolnay <dtolnay@gmail.com> | 2019-11-29 23:16:46 -0800 |
| commit | f34990e9b504ab5062d0dbd953d45bc382de0bc6 (patch) | |
| tree | 7002217e2d6e1c69006e4440548a52ba7bb271ec /src/rustllvm/PassWrapper.cpp | |
| parent | 8f1bbd69e13c9e04a4c2b75612bc0c31af972439 (diff) | |
| download | rust-f34990e9b504ab5062d0dbd953d45bc382de0bc6.tar.gz rust-f34990e9b504ab5062d0dbd953d45bc382de0bc6.zip | |
Remove unneeded prelude imports in libcore tests
These three lines are from c82da7a54b9efb1a0ccbe11de66c71f547bf7db9 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::*;
| ^^^^^^^^^^^^^^^^^^^
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
