about summary refs log tree commit diff
path: root/src/libstd/lib.rs
AgeCommit message (Collapse)AuthorLines
2015-08-15std: Add issues to all unstable featuresAlex Crichton-1/+1
2015-08-14rustc: Allow changing the default allocatorAlex Crichton-2/+0
This commit is an implementation of [RFC 1183][rfc] which allows swapping out the default allocator on nightly Rust. No new stable surface area should be added as a part of this commit. [rfc]: https://github.com/rust-lang/rfcs/pull/1183 Two new attributes have been added to the compiler: * `#![needs_allocator]` - this is used by liballoc (and likely only liballoc) to indicate that it requires an allocator crate to be in scope. * `#![allocator]` - this is a indicator that the crate is an allocator which can satisfy the `needs_allocator` attribute above. The ABI of the allocator crate is defined to be a set of symbols that implement the standard Rust allocation/deallocation functions. The symbols are not currently checked for exhaustiveness or typechecked. There are also a number of restrictions on these crates: * An allocator crate cannot transitively depend on a crate that is flagged as needing an allocator (e.g. allocator crates can't depend on liballoc). * There can only be one explicitly linked allocator in a final image. * If no allocator is explicitly requested one will be injected on behalf of the compiler. Binaries and Rust dylibs will use jemalloc by default where available and staticlibs/other dylibs will use the system allocator by default. Two allocators are provided by the distribution by default, `alloc_system` and `alloc_jemalloc` which operate as advertised. Closes #27389
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-2/+0
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-11rollup merge of #27678: alexcrichton/snapshotsAlex Crichton-3/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-11Register new snapshotsAlex Crichton-3/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-3/+3
Also fixes a few outdated links.
2015-08-04syntax: Don't assume `std` exists for testsAlex Crichton-8/+0
This commit removes the injection of `std::env::args()` from `--test` expanded code, relying on the test runner itself to call this funciton. This is more hygienic because we can't assume that `std` exists at the top layer all the time, and it meaks the injected test module entirely self contained.
2015-08-03syntax: Implement #![no_core]Alex Crichton-3/+7
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184
2015-08-02std: Tighten up crate docsBrian Anderson-11/+6
2015-07-31trpl: fix link errorFuGangqiang-1/+1
2015-07-30Auto merge of #27388 - alexcrichton:remove-curious-inner, r=brsonbors-22/+5
This isn't actually necessary any more with the advent of `$crate` and changes in the compiler to expand macros to `::core::$foo` in the context of a `#![no_std]` crate. The libcore inner module was also trimmed down a bit to the bare bones.
2015-07-29std: Remove the curious inner moduleAlex Crichton-22/+5
This isn't actually necessary any more with the advent of `$crate` and changes in the compiler to expand macros to `::core::$foo` in the context of a `#![no_std]` crate. The libcore inner module was also trimmed down a bit to the bare bones.
2015-07-30Rollup merge of #27369 - brson:realstd, r=alexcrichtonManish Goregaokar-10/+5
Since most lang items are actually defined in core, these hack reexports don't actually do anything useful.
2015-07-28std: Remove some old #[cfg(test) hacksBrian Anderson-10/+5
Since most lang items are actually defined in core, these hack reexports don't actually do anything useful.
2015-07-28Auto merge of #27309 - eddyb:snapshot-infdef, r=alexcrichtonbors-1/+0
FreeBSD i386 snapshot is missing, failed tests (possibly spurious). r? @alexcrichton
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-1/+0
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-27Register new snapshots (2015-07-26 a5c12f4).Eduard Burtescu-1/+0
2015-07-25Auto merge of #27233 - tbu-:pr_wtf8, r=alexcrichtonbors-0/+1
2015-07-24Add unstable attribute to `char::from_u32_unchecked`Tobias Bucher-0/+1
2015-07-22Avoid feature-warnings on stage0.Felix S. Klock II-0/+1
2015-07-22Add feature-gates for desugaring-based `box` and placement-`in`.Felix S. Klock II-0/+1
update test/compile-fail/feature-gate-box-expr.rs to reflect new feature gates. Part of what lands with Issue 22181.
2015-07-20Address feedbackBrian Anderson-3/+3
2015-07-20std: Create separate docs for the primitivesBrian Anderson-6/+4
Having the primitive and module docs derived from the same source causes problems, primarily that they can't contain hyperlinks cross-referencing each other. This crates dedicated private modules in `std` to document the primitive types, then for all primitives that have a corresponding module, puts hyperlinks in moth the primitive docs and the module docs cross-linking each other. This should help clear up confusion when readers find themselves on the wrong page.
2015-07-16Rollup merge of #26977 - brson:stddoc, r=GankroManish Goregaokar-28/+128
Yet another attempt to make the prose on the std crate page clearer and more informative. This does a lot of things: tightens up the opening, adds useful links (including a link to the search bar), offers guidance on how to use the docs, and expands the prelude docs as a useful newbie entrypoint. r? @steveklabnik cc @aturon
2015-07-14Address more feedbackBrian Anderson-3/+3
2015-07-14Address more feedbackBrian Anderson-4/+5
2015-07-14Use Vec::drain in BufWriterUlrik Sverdrup-0/+1
I happened past a comment that asked for functionality that we now have.
2015-07-13Address feedbackBrian Anderson-31/+35
2015-07-13Fix local pathBrian Anderson-1/+1
2015-07-13std: Refining crate docsBrian Anderson-26/+121
Yet another attempt to make the prose on the std crate page clearer and more informative. This does a lot of things: tightens up the opening, adds useful links (including a link to the search bar), offers guidance on how to use the docs, and expands the prelude docs as a useful newbie entrypoint.
2015-07-09Test that CStr and CString have equivalent hashes.Jonathan Reem-1/+1
2015-07-08Improve Vec::resize so that it can be used in Read::read_to_endUlrik Sverdrup-0/+1
We needed a more efficient way to zerofill the vector in read_to_end. This to reduce the memory intialization overhead to a minimum. Use the implementation of `std::vec::from_elem` (used for the vec![] macro) for Vec::resize as well. For simple element types like u8, this compiles to memset, so it makes Vec::resize much more efficient.
2015-07-01msvc: Fix TLS destructorsAlex Crichton-0/+1
Just like the original article our Windows TLS support is based on predicted, this symbol must be linked in on MSVC to pull in the necessary support for TLS variables. This commit fixes a number of unit tests which require that TLS destructors are run.
2015-06-24Fix capitalization in std docsBrian Anderson-1/+1
"Rust" and "The Rust Standard Library" are capitalized.
2015-06-22sys/unix/c.rs: Remove unused codeGeoffrey Thomas-2/+0
It looks like a lot of this dated to previous incarnations of the io module, etc., and went unused in the reworking leading up to 1.0. Remove everything we're not actively using (except for signal handling, which will be reworked in the next commit).
2015-06-18Fix libstd testsAlex Crichton-1/+4
2015-06-17More test fixes and fallout of stability changesAlex Crichton-1/+0
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-2/+2
2015-06-17std: Split the `std_misc` featureAlex Crichton-1/+1
2015-06-17collections: Split the `collections` featureAlex Crichton-0/+5
This commit also deprecates the `as_string` and `as_slice` free functions in the `string` and `vec` modules.
2015-06-17alloc: Split apart the global `alloc` featureAlex Crichton-0/+3
2015-06-17core: Split apart the global `core` featureAlex Crichton-6/+20
This commit shards the broad `core` feature of the libcore library into finer grained features. This split groups together similar APIs and enables tracking each API separately, giving a better sense of where each feature is within the stabilization process. A few minor APIs were deprecated along the way: * Iterator::reverse_in_place * marker::NoCopy
2015-05-27Use `const fn` to abstract away the contents of UnsafeCell & friends.Eduard Burtescu-0/+1
2015-05-23Rollup merge of #25709 - MatejLach:stdlib_style, r=steveklabnikOliver Schneider-1/+1
Sounds better to me this way. r @steveklabnik ?
2015-05-22better describe the stdlibMatej Ľach-1/+1
2015-05-19Stabilize debug builders for 1.2.0Steven Fackler-1/+0
2015-05-16Auto merge of #25462 - alexcrichton:favicon-https, r=nrcbors-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
2015-05-15libs: Move favicon URLs to HTTPSAlex Crichton-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
2015-05-15std: fix a linkIvan Ukhov-1/+1
2015-05-14Rollup merge of #25414 - apasel422:patch-1, r=alexcrichtonSteve Klabnik-1/+1