2011-12-20 14:29:59 -06:00
|
|
|
// Top-level, visible-everywhere definitions.
|
|
|
|
|
2012-03-02 19:20:00 -06:00
|
|
|
// Export various ubiquitous types, constructors, methods.
|
2011-12-20 14:29:59 -06:00
|
|
|
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use option::{Some, None};
|
|
|
|
pub use Option = option::Option;
|
|
|
|
pub use result::{Result, Ok, Err};
|
2012-08-28 16:49:22 -05:00
|
|
|
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use Path = path::Path;
|
|
|
|
pub use GenericPath = path::GenericPath;
|
|
|
|
pub use WindowsPath = path::WindowsPath;
|
|
|
|
pub use PosixPath = path::PosixPath;
|
2012-08-24 17:28:43 -05:00
|
|
|
|
2012-10-07 18:01:01 -05:00
|
|
|
pub use tuple::{CopyableTuple, ImmutableTuple, ExtendedTupleOps};
|
2012-10-15 15:53:16 -05:00
|
|
|
pub use str::{StrSlice, Trimmable};
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use vec::{ConstVector, CopyableVector, ImmutableVector};
|
|
|
|
pub use vec::{ImmutableEqVector, ImmutableCopyableVector};
|
|
|
|
pub use vec::{MutableVector, MutableCopyableVector};
|
|
|
|
pub use iter::{BaseIter, ExtendedIter, EqIter, CopyableIter};
|
2012-10-31 18:02:16 -05:00
|
|
|
pub use iter::{CopyableOrderedIter, CopyableNonstrictIter, Times};
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use num::Num;
|
|
|
|
pub use ptr::Ptr;
|
|
|
|
pub use to_str::ToStr;
|
2012-07-28 16:13:08 -05:00
|
|
|
|
2012-07-25 20:36:18 -05:00
|
|
|
// The following exports are the core operators and kinds
|
2012-07-28 16:13:08 -05:00
|
|
|
// The compiler has special knowlege of these so we must not duplicate them
|
|
|
|
// when compiling for testing
|
|
|
|
#[cfg(notest)]
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use ops::{Const, Copy, Send, Owned};
|
2012-07-28 16:13:08 -05:00
|
|
|
#[cfg(notest)]
|
2012-11-05 19:50:01 -06:00
|
|
|
pub use ops::{Drop};
|
|
|
|
#[cfg(notest)]
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr, BitXor};
|
2012-07-28 16:13:08 -05:00
|
|
|
#[cfg(notest)]
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use ops::{Shl, Shr, Index};
|
2011-12-20 14:29:59 -06:00
|
|
|
|
2012-07-28 18:05:38 -05:00
|
|
|
#[cfg(test)]
|
2012-10-12 18:41:25 -05:00
|
|
|
extern mod coreops(name = "core", vers = "0.5");
|
2012-07-28 18:05:38 -05:00
|
|
|
|
|
|
|
#[cfg(test)]
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use coreops::ops::{Const, Copy, Send, Owned};
|
|
|
|
#[cfg(test)]
|
2012-11-05 19:50:01 -06:00
|
|
|
pub use coreops::ops::{Drop};
|
|
|
|
#[cfg(test)]
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use coreops::ops::{Add, Sub, Mul, Div, Modulo, Neg, BitAnd, BitOr};
|
2012-07-28 18:05:38 -05:00
|
|
|
#[cfg(test)]
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use coreops::ops::{BitXor};
|
2012-07-28 18:05:38 -05:00
|
|
|
#[cfg(test)]
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use coreops::ops::{Shl, Shr, Index};
|
2012-07-28 18:05:38 -05:00
|
|
|
|
2012-11-26 18:12:47 -06:00
|
|
|
#[cfg(notest)]
|
|
|
|
pub use clone::Clone;
|
|
|
|
#[cfg(test)]
|
|
|
|
pub use coreops::clone::Clone;
|
2012-07-28 18:05:38 -05:00
|
|
|
|
2011-12-20 14:29:59 -06:00
|
|
|
// Export the log levels as global constants. Higher levels mean
|
|
|
|
// more-verbosity. Error is the bottom level, default logging level is
|
|
|
|
// warn-and-below.
|
|
|
|
|
2012-07-04 16:53:12 -05:00
|
|
|
/// The error log level
|
2012-11-15 14:03:45 -06:00
|
|
|
pub const error : u32 = 1_u32;
|
2012-07-04 16:53:12 -05:00
|
|
|
/// The warning log level
|
2012-11-15 14:03:45 -06:00
|
|
|
pub const warn : u32 = 2_u32;
|
2012-07-04 16:53:12 -05:00
|
|
|
/// The info log level
|
2012-11-15 14:03:45 -06:00
|
|
|
pub const info : u32 = 3_u32;
|
2012-07-04 16:53:12 -05:00
|
|
|
/// The debug log level
|
2012-11-15 14:03:45 -06:00
|
|
|
pub const debug : u32 = 4_u32;
|
2011-12-22 16:42:52 -06:00
|
|
|
|
|
|
|
// A curious inner-module that's not exported that contains the binding
|
|
|
|
// 'core' so that macro-expanded references to core::error and such
|
|
|
|
// can be resolved within libcore.
|
2012-09-19 18:52:32 -05:00
|
|
|
#[doc(hidden)] // FIXME #3538
|
2011-12-22 16:42:52 -06:00
|
|
|
mod core {
|
2012-11-15 14:03:45 -06:00
|
|
|
pub const error : u32 = 1_u32;
|
|
|
|
pub const warn : u32 = 2_u32;
|
|
|
|
pub const info : u32 = 3_u32;
|
|
|
|
pub const debug : u32 = 4_u32;
|
2012-01-17 18:45:22 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Similar to above. Some magic to make core testable.
|
|
|
|
#[cfg(test)]
|
|
|
|
mod std {
|
2012-10-12 18:41:25 -05:00
|
|
|
extern mod std(vers = "0.5");
|
2012-10-03 21:24:06 -05:00
|
|
|
pub use std::test;
|
2012-01-20 10:12:03 -06:00
|
|
|
}
|