Skip to content

Commit f34990e

Browse files
committed
Remove unneeded prelude imports in libcore tests
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::*; | ^^^^^^^^^^^^^^^^^^^
1 parent 8f1bbd6 commit f34990e

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

src/libcore/tests/num/bignum.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::prelude::v1::*;
21
use core::num::bignum::tests::Big8x3 as Big;
32

43
#[test]

src/libcore/tests/num/flt2dec/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::prelude::v1::*;
21
use std::{str, i16, f32, f64, fmt};
32

43
use core::num::flt2dec::{decode, DecodableFloat, FullDecoded, Decoded};

src/libcore/tests/num/flt2dec/strategy/dragon.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
use std::prelude::v1::*;
21
use super::super::*;
32
use core::num::bignum::Big32x40 as Big;
43
use core::num::flt2dec::strategy::dragon::*;

0 commit comments

Comments
 (0)