Skip to content

Commit 5a2f65f

Browse files
committed
auto merge of #6441 : alexcrichton/rust/issue-5531, r=luqmana
Also fix up all the fallout elsewhere throughout core. It's really nice being able to have the prelude. I'm not quite sure how resolution works with traits, but it seems to me like the public imports at the top-level of the core crate were leaking into the sub-crates, but that could also be working as intended. Regardless, things compile without the re-exports now.
2 parents 3aa1122 + 66e1e51 commit 5a2f65f

34 files changed

+81
-80
lines changed

src/libcore/at_vec.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,10 @@
1111
//! Managed vectors
1212
1313
use cast::transmute;
14+
use container::Container;
1415
use kinds::Copy;
1516
use old_iter;
17+
use old_iter::BaseIter;
1618
use option::Option;
1719
use sys;
1820
use uint;

src/libcore/comm.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,13 @@ Message passing
1313
*/
1414

1515
use cast::{transmute, transmute_mut};
16+
use container::Container;
1617
use either::{Either, Left, Right};
1718
use kinds::Owned;
1819
use option::{Option, Some, None};
1920
use uint;
20-
use unstable;
2121
use vec;
22+
use vec::OwnedVector;
2223
use util::replace;
2324
use unstable::sync::{Exclusive, exclusive};
2425

@@ -577,7 +578,7 @@ impl<T:Owned,
577578
#[cfg(test)]
578579
mod test {
579580
use either::Right;
580-
use super::{Chan, Port, oneshot, recv_one, stream};
581+
use super::{Chan, Port, oneshot, stream};
581582
582583
#[test]
583584
fn test_select2() {

src/libcore/core.rc

Lines changed: 0 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -68,48 +68,6 @@ they contained the following prologue:
6868
#[cfg(test)] pub use ops = realcore::ops;
6969
#[cfg(test)] pub use cmp = realcore::cmp;
7070

71-
/* Reexported core operators */
72-
73-
pub use kinds::{Const, Copy, Owned};
74-
pub use ops::{Drop};
75-
pub use ops::{Add, Sub, Mul, Div, Rem, Neg, Not};
76-
pub use ops::{BitAnd, BitOr, BitXor};
77-
pub use ops::{Shl, Shr, Index};
78-
79-
80-
/* Reexported types and traits */
81-
82-
pub use option::{Option, Some, None};
83-
pub use result::{Result, Ok, Err};
84-
85-
pub use path::Path;
86-
pub use path::GenericPath;
87-
pub use path::WindowsPath;
88-
pub use path::PosixPath;
89-
90-
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
91-
pub use str::{StrSlice};
92-
pub use container::{Container, Mutable};
93-
pub use vec::{CopyableVector, ImmutableVector};
94-
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
95-
pub use vec::{OwnedVector, OwnedCopyableVector, MutableVector};
96-
pub use old_iter::{BaseIter, ExtendedIter, EqIter, CopyableIter};
97-
pub use old_iter::{CopyableOrderedIter, CopyableNonstrictIter};
98-
pub use old_iter::{ExtendedMutableIter};
99-
pub use iter::Times;
100-
101-
pub use num::{Num, NumCast};
102-
pub use num::{Orderable, Signed, Unsigned, Round};
103-
pub use num::{Algebraic, Trigonometric, Exponential, Hyperbolic};
104-
pub use num::{Integer, Fractional, Real, RealExt};
105-
pub use num::{Bitwise, BitCount, Bounded};
106-
pub use num::{Primitive, Int, Float};
107-
108-
pub use ptr::Ptr;
109-
pub use from_str::FromStr;
110-
pub use to_str::ToStr;
111-
pub use clone::Clone;
112-
11371
// On Linux, link to the runtime with -lrt.
11472
#[cfg(target_os = "linux")]
11573
#[doc(hidden)]

src/libcore/either.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010

1111
//! A type that represents one of two alternatives
1212
13+
use container::Container;
1314
use cmp::Eq;
1415
use kinds::Copy;
16+
use old_iter::BaseIter;
1517
use result::Result;
1618
use result;
1719
use vec;
20+
use vec::OwnedVector;
1821

1922
/// The either type
2023
#[deriving(Clone, Eq)]

src/libcore/hash.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
#[cfg(stage0)]
2323
use cast;
24+
use container::Container;
25+
use old_iter::BaseIter;
2426
use rt::io::Writer;
2527
use to_bytes::IterBytes;
2628
use uint;

src/libcore/io.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Basic input/output
1616

1717
use result::Result;
1818

19+
use container::Container;
1920
use int;
2021
use libc;
2122
use libc::{c_int, c_long, c_void, size_t, ssize_t};
@@ -24,11 +25,15 @@ use os;
2425
use cast;
2526
use path::Path;
2627
use ops::Drop;
28+
use old_iter::{BaseIter, CopyableIter};
2729
use ptr;
2830
use result;
2931
use str;
32+
use str::StrSlice;
33+
use to_str::ToStr;
3034
use uint;
3135
use vec;
36+
use vec::{OwnedVector, OwnedCopyableVector};
3237

3338
#[allow(non_camel_case_types)] // not sure what to do about this
3439
pub type fd_t = c_int;

src/libcore/iter.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ much easier to implement.
4242

4343
#[cfg(not(stage0))] use cmp::Ord;
4444
#[cfg(not(stage0))] use option::{Option, Some, None};
45+
#[cfg(not(stage0))] use vec::OwnedVector;
4546

4647
#[cfg(stage0)]
4748
pub trait Times {

src/libcore/logging.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ pub fn console_off() {
4545
#[cfg(not(test))]
4646
#[lang="log_type"]
4747
pub fn log_type<T>(level: u32, object: &T) {
48+
use container::Container;
4849
use cast::transmute;
4950
use io;
5051
use libc;

src/libcore/num/strconv.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
use container::Container;
1112
use core::cmp::{Ord, Eq};
1213
use ops::{Add, Sub, Mul, Div, Rem, Neg};
1314
use option::{None, Option, Some};
1415
use char;
1516
use str;
1617
use kinds::Copy;
1718
use vec;
19+
use vec::{CopyableVector, ImmutableVector};
20+
use vec::OwnedVector;
1821
use num::{NumCast, Zero, One, cast, pow_with_uint};
1922
use f64;
2023

src/libcore/option.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ use util;
4848
use num::Zero;
4949
use old_iter::{BaseIter, MutableIter, ExtendedIter};
5050
use old_iter;
51+
use str::StrSlice;
5152

5253
#[cfg(test)] use str;
5354

0 commit comments

Comments
 (0)