about summary refs log tree commit diff
path: root/src/rustllvm/PassWrapper.cpp
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-11-30 16:56:56 +0100
committerGitHub <noreply@github.com>2019-11-30 16:56:56 +0100
commitb4bffcebca8840a5b8502289bf5ab0829f5c1e60 (patch)
tree571c1663ba9b4a7f3668e2de9c59eeea10eabf78 /src/rustllvm/PassWrapper.cpp
parent2e83c6d114dcf49c93dbd7fbaa9ca3d8b67c54e8 (diff)
parentf34990e9b504ab5062d0dbd953d45bc382de0bc6 (diff)
downloadrust-b4bffcebca8840a5b8502289bf5ab0829f5c1e60.tar.gz
rust-b4bffcebca8840a5b8502289bf5ab0829f5c1e60.zip
Rollup merge of #66894 - dtolnay:prelude, r=Centril
Remove unneeded prelude imports in libcore tests

These three lines are from c82da7a54b9efb1a0ccbe11de66c71f547bf7db9 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::*;
  |         ^^^^^^^^^^^^^^^^^^^
```
Diffstat (limited to 'src/rustllvm/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions