summary refs log tree commit diff
path: root/src/libstd/lib.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-08-22 09:59:07 +0000
committerbors <bors@rust-lang.org>2015-08-22 09:59:07 +0000
commit94ee3b5a54a9f4965b82f5e4eda512966e96ac63 (patch)
treed404e61ade0e002ee43c690d64e4fb2e2900c694 /src/libstd/lib.rs
parente9b74a90172e99e361ff46277f52bfc03d0a7ba4 (diff)
parenta2b932c0b614aa5a68f7d24977fab241998a89ef (diff)
downloadrust-94ee3b5a54a9f4965b82f5e4eda512966e96ac63.tar.gz
rust-94ee3b5a54a9f4965b82f5e4eda512966e96ac63.zip
Auto merge of #27871 - alexcrichton:stabilize-libcore, r=aturon
These commits move libcore into a state so that it's ready for stabilization, performing some minor cleanup:

* The primitive modules for integers in the standard library were all removed from the source tree as they were just straight reexports of the libcore variants.
* The `core::atomic` module now lives in `core::sync::atomic`. The `core::sync` module is otherwise empty, but ripe for expansion!
* The `core::prelude::v1` module was stabilized after auditing that it is a subset of the standard library's prelude plus some primitive extension traits (char, str, and slice)
* Some unstable-hacks for float parsing errors were shifted around to not use the same unstable hacks (e.g. the `flt2dec` module is now used for "privacy").


After this commit, the remaining large unstable functionality specific to libcore is:

* `raw`, `intrinsics`, `nonzero`, `array`, `panicking`, `simd` -- these modules are all unstable or not reexported in the standard library, so they're just remaining in the same status quo as before
* `num::Float` - this extension trait for floats needs to be audited for functionality (much of that is happening in #27823)  and may also want to be renamed to `FloatExt` or `F32Ext`/`F64Ext`.
* Should the extension traits for primitives be stabilized in libcore?

I believe other unstable pieces are not isolated to just libcore but also affect the standard library.

cc #27701
Diffstat (limited to 'src/libstd/lib.rs')
-rw-r--r--src/libstd/lib.rs45
1 files changed, 16 insertions, 29 deletions
diff --git a/src/libstd/lib.rs b/src/libstd/lib.rs
index baca87809a6..179f0727d46 100644
--- a/src/libstd/lib.rs
+++ b/src/libstd/lib.rs
@@ -254,7 +254,6 @@
 // Don't link to std. We are std.
 #![no_std]
 
-#![allow(trivial_casts)]
 #![deny(missing_docs)]
 
 #[cfg(test)] extern crate test;
@@ -264,7 +263,7 @@
 // imported by the compiler (via our #[no_std] attribute) In this case we just
 // add a new crate name so we can attach the reexports to it.
 #[macro_reexport(assert, assert_eq, debug_assert, debug_assert_eq,
-    unreachable, unimplemented, write, writeln)]
+                 unreachable, unimplemented, write, writeln)]
 extern crate core as __core;
 
 #[macro_use]
@@ -309,7 +308,6 @@ pub use core_collections::fmt;
 pub use core_collections::slice;
 pub use core_collections::str;
 pub use core_collections::string;
-#[stable(feature = "rust1", since = "1.0.0")]
 pub use core_collections::vec;
 
 pub use rustc_unicode::char;
@@ -328,32 +326,21 @@ pub mod prelude;
 
 /* Primitive types */
 
-// NB: slice and str are primitive types too, but their module docs + primitive doc pages
-// are inlined from the public re-exports of core_collections::{slice, str} above.
-
-#[path = "num/float_macros.rs"]
-#[macro_use]
-mod float_macros;
-
-#[path = "num/int_macros.rs"]
-#[macro_use]
-mod int_macros;
-
-#[path = "num/uint_macros.rs"]
-#[macro_use]
-mod uint_macros;
-
-#[path = "num/isize.rs"]  pub mod isize;
-#[path = "num/i8.rs"]   pub mod i8;
-#[path = "num/i16.rs"]  pub mod i16;
-#[path = "num/i32.rs"]  pub mod i32;
-#[path = "num/i64.rs"]  pub mod i64;
-
-#[path = "num/usize.rs"] pub mod usize;
-#[path = "num/u8.rs"]   pub mod u8;
-#[path = "num/u16.rs"]  pub mod u16;
-#[path = "num/u32.rs"]  pub mod u32;
-#[path = "num/u64.rs"]  pub mod u64;
+// NB: slice and str are primitive types too, but their module docs + primitive
+// doc pages are inlined from the public re-exports of core_collections::{slice,
+// str} above.
+
+pub use core::isize;
+pub use core::i8;
+pub use core::i16;
+pub use core::i32;
+pub use core::i64;
+
+pub use core::usize;
+pub use core::u8;
+pub use core::u16;
+pub use core::u32;
+pub use core::u64;
 
 #[path = "num/f32.rs"]   pub mod f32;
 #[path = "num/f64.rs"]   pub mod f64;