about summary refs log tree commit diff
path: root/src/libcore/lib.rs
AgeCommit message (Collapse)AuthorLines
2016-05-13Fix fast path of float parsing on x87Andrea Canciani-0/+2
The fast path of the float parser relies on the rounding to happen exactly and directly to the correct number of bits. On x87, instead, double rounding would occour as the FPU stack defaults to 80 bits of precision. This can be fixed by setting the precision of the FPU stack before performing the int to float conversion. This can be achieved by changing the value of the x87 control word. This is a somewhat common operation that is in fact performed whenever a float needs to be truncated to an integer, but it is undesirable to add its overhead for code that does not rely on x87 for computations (i.e. on non-x86 architectures, or x86 architectures which perform FPU computations on using SSE). Fixes `num::dec2flt::fast_path_correct` (on x87).
2016-05-11Extend rustc_on_unimplemented flag: if a message is available at an impl, ↵ggomez-0/+1
this message will be displayed instead
2016-05-09Add #[cfg(target_has_atomic)] to get atomic support for the current targetAmanieu d'Antras-0/+1
2016-04-05Specialize equality for [T] and comparison for [u8]Ulrik Sverdrup-0/+1
Where T is a type that can be compared for equality bytewise, we can use memcmp. We can also use memcmp for PartialOrd, Ord for [u8] and by extension &str. This is an improvement for example for the comparison [u8] == [u8] that used to emit a loop that compared the slices byte by byte. One worry here could be that this introduces function calls to memcmp in contexts where it should really inline the comparison or even optimize it out, but llvm takes care of recognizing memcmp specifically.
2016-03-22sprinkle feature gates here and thereJorge Aparicio-0/+1
2016-03-21Auto merge of #32054 - seanmonstar:impl-debug-core, r=alexcrichtonbors-0/+1
libcore: add Debug implementations to most missing types Also adds `#![deny(missing_debug_implementations)]` to the core crate. cc #31869
2016-03-20Update snapshots to 2016-03-18 (235d774).Eduard Burtescu-0/+1
2016-03-20libcore: add Debug implementations to most missing typesSean McArthur-0/+1
2016-03-17Add #[rustc_no_mir] to make tests pass with -Z orbit.Eduard Burtescu-0/+1
2016-01-24mk: Move from `-D warnings` to `#![deny(warnings)]`Alex Crichton-0/+1
This commit removes the `-D warnings` flag being passed through the makefiles to all crates to instead be a crate attribute. We want these attributes always applied for all our standard builds, and this is more amenable to Cargo-based builds as well. Note that all `deny(warnings)` attributes are gated with a `cfg(stage0)` attribute currently to match the same semantics we have today
2015-12-21Register new snapshotsAlex Crichton-7/+1
Lots of cruft to remove!
2015-12-16Remove incorrect words about libcore's stabilitySteve Klabnik-6/+0
2015-12-10std: Remove deprecated functionality from 1.5Alex Crichton-6/+0
This is a standard "clean out libstd" commit which removes all 1.5-and-before deprecated functionality as it's now all been deprecated for at least one entire cycle.
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-9/+4
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-11-25Remove all uses of `#[staged_api]`Vadim Petrochenkov-1/+1
2015-11-20Rename #[deprecated] to #[rustc_deprecated]Vadim Petrochenkov-1/+2
2015-11-18Fix typo in libcore documentationAndrea Canciani-1/+1
2015-11-18Auto merge of #29882 - devonhollowood:master, r=Manishearthbors-1/+0
Implement #14615
2015-11-17Remove claims of dependency-free libcoreSteve Klabnik-1/+4
libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390 Fixes #29502
2015-11-17Remove 'raw_pointer_derive' lint (#14615)Devon Hollowood-1/+0
2015-11-12libcore: deny warnings in doctestsKevin Butler-1/+1
2015-09-14Mark all extern functions as nounwindBjörn Steinbrink-0/+1
Unwinding across an FFI boundary is undefined behaviour, so we can mark all external function as nounwind. The obvious exception are those functions that actually perform the unwinding.
2015-08-22Move the Borrow and BorrowMut traits to libcore.Simon Sapin-0/+1
2015-08-22Auto merge of #27871 - alexcrichton:stabilize-libcore, r=aturonbors-1/+1
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
2015-08-22Auto merge of #27860 - m4rw3r:rustdoc_unstable_feature_issue, r=alexcrichtonbors-1/+2
Implemented #27759 Example: ![screen shot 2015-08-16 at 21 45 17](https://cloud.githubusercontent.com/assets/108100/9295040/1fb24d50-4460-11e5-8ab8-81ac5330974a.png)
2015-08-17Shim some of the old std::simd functionality.Huon Wilson-1/+1
Overload the operators using the traits so that things mostly keep working during the deprecation period.
2015-08-17Rename `simd_basics` feature gate to `repr_simd`.Huon Wilson-1/+1
2015-08-17switch core::simd to repr(simd) and deprecate it.Huon Wilson-1/+8
This functionality will be available out of tree in the `simd` crate on crates.io. [breaking-change]
2015-08-17core: Move `atomic` into a new `sync` moduleAlex Crichton-1/+1
This mirrors the same hierarchy in the standard library.
2015-08-16rustdoc: Added issue_tracker_base_url annotations to cratesMartin Wernstål-1/+2
2015-08-15core: Fill out issues for unstable featuresAlex Crichton-1/+2
2015-08-11rollup merge of #27678: alexcrichton/snapshotsAlex Crichton-34/+10
* 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-34/+10
* 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-03syntax: Implement #![no_core]Alex Crichton-2/+5
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-07-31Auto merge of #27382 - brson:gate-assoc-type, r=alexcrichtonbors-0/+1
There are still problems in both the design and implementation of this, so we don't want it landing in 1.2. cc @arielb1 @nikomatsakis cc #27364 r? @alexcrichton
2015-07-29Feature gate associated type defaultsBrian Anderson-0/+1
There are multiple issues with them as designed and implemented. cc #27364
2015-07-29std: Remove the curious inner moduleAlex Crichton-15/+17
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-20std: Create separate docs for the primitivesBrian Anderson-4/+0
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-06-17core: Split apart the global `core` featureAlex Crichton-2/+6
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-15libs: Move favicon URLs to HTTPSAlex Crichton-1/+1
Helps prevent mixed content warnings if accessing docs over HTTPS. Closes #25459
2015-04-28Register new snapshotsTamir Duberstein-1/+1
2015-04-21std: Bring back f32::from_str_radix as an unstable APIAlex Crichton-0/+1
This API was exercised in a few tests and mirrors the `from_str_radix` functionality of the integer types.
2015-04-11Change the rt::unwind line argument type from usize to u32.Ryan Prichard-1/+1
2015-04-10Change `derive` expansions to use `discriminant_value` intrinsic.Felix S. Klock II-0/+1
Fix #15523.
2015-04-01Collect the definition of the `Error` trait into `libstd` for now. ThisNiko Matsakis-1/+0
sidesteps a coherence difficulty where `liballoc` had to prove that `&str: !Error`, which didn't involve any local types.
2015-04-01Add `#[fundamental]` annotations into libcore so that `Sized` and theNiko Matsakis-0/+2
`Fn` traits are considered fundamental, along with `Box` (though that is mostly for show; the real type is `~T` in the compiler).
2015-03-31std: Clean out #[deprecated] APIsAlex Crichton-1/+0
This commit cleans out a large amount of deprecated APIs from the standard library and some of the facade crates as well, updating all users in the compiler and in tests as it goes along.
2015-03-27rollup merge of #23741: alexcrichton/remove-int-uintAlex Crichton-1/+0
Conflicts: src/librustc/middle/ty.rs src/librustc_trans/trans/adt.rs src/librustc_typeck/check/mod.rs src/libserialize/json.rs src/test/run-pass/spawn-fn.rs