]> git.lizzy.rs Git - rust.git/commit
Rollup merge of #38085 - estebank:empty-import-list-fix-38012, r=jseyfried
authorGuillaume Gomez <guillaume1.gomez@gmail.com>
Wed, 7 Dec 2016 18:42:51 +0000 (10:42 -0800)
committerGitHub <noreply@github.com>
Wed, 7 Dec 2016 18:42:51 +0000 (10:42 -0800)
commit494f68626348ae98165e0c253e4540d22492e5bc
treef498bda9f1ea07461b9d9351c235a9f13d026503
parent7846610470392abc3ab1470853bbe7b408fe4254
parent58e70e7b14fcf58ea4ee0cedd198cd1ab5ececa4
Rollup merge of #38085 - estebank:empty-import-list-fix-38012, r=jseyfried

Warn when an import list is empty

For a given file

```rust
use std::*;
use std::{};
```

output the following warnings

```
warning: unused import: `use std::{};`, #[warn(unused_imports)] on by default
 --> file.rs:2:1
  |
2 | use std::{};
  | ^^^^^^^^^^^^

warning: unused import: `std::*;`, #[warn(unused_imports)] on by default
 --> file.rs:1:5
  |
1 | use std::*;
  |     ^^^^^^^
```