summary refs log tree commit diff
path: root/src/libcore/lib.rs
AgeCommit message (Collapse)AuthorLines
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
2015-03-26Implement `Reflect` trait with a variant on the standard OIBITNiko Matsakis-0/+1
semantics that tests the *interface* of trait objects, rather than what they close over.
2015-03-26Mass rename uint/int to usize/isizeAlex Crichton-1/+0
Now that support has been removed, all lingering use cases are renamed.
2015-03-23rollup merge of #23598: brson/gateAlex Crichton-0/+1
Conflicts: src/compiletest/compiletest.rs src/libcollections/lib.rs src/librustc_back/lib.rs src/libserialize/lib.rs src/libstd/lib.rs src/libtest/lib.rs src/test/run-make/rustdoc-default-impl/foo.rs src/test/run-pass/env-home-dir.rs
2015-03-23Add generic conversion traitsAaron Turon-0/+1
This commit: * Introduces `std::convert`, providing an implementation of RFC 529. * Deprecates the `AsPath`, `AsOsStr`, and `IntoBytes` traits, all in favor of the corresponding generic conversion traits. Consequently, various IO APIs now take `AsRef<Path>` rather than `AsPath`, and so on. Since the types provided by `std` implement both traits, this should cause relatively little breakage. * Deprecates many `from_foo` constructors in favor of `from`. * Changes `PathBuf::new` to take no argument (creating an empty buffer, as per convention). The previous behavior is now available as `PathBuf::from`. * De-stabilizes `IntoCow`. It's not clear whether we need this separate trait. Closes #22751 Closes #14433 [breaking-change]
2015-03-23Add #![feature] attributes to doctestsBrian Anderson-0/+1
2015-03-18Avoid metadata bloat by using trait FixedSizeArrayVadim Petrochenkov-1/+1
2015-03-06Rollup merge of #23100 - wesleywiser:fix_23059, r=brsonManish Goregaokar-2/+1
Fixes #23059
2015-03-06Rollup merge of #23056 - awlnx:master, r=nrcManish Goregaokar-0/+2
2015-03-05Fix reference to 'librlibc' in libcore docsWesley Wiser-2/+1
Fixes #23059
2015-03-05fix for new attributes failing. issue #22964awlnx-0/+2
2015-03-03Added `OverflowingOps` trait to core::num::wrapping.Felix S. Klock II-0/+1
These return the result of the operation *plus* an overflow/underflow bit. This can make it easier to write operations where you want to chain some arithmetic together, but also want to return a flag signalling if overflow every occurred.
2015-03-01Remove int/uintGuillaumeGomez-3/+1
2015-02-24Auto merge of #21689 - FlaPer87:oibit-send-and-friends, r=nikomatsakisbors-0/+1
This is one more step towards completing #13231 This series of commits add support for default trait implementations. The changes in this PR don't break existing code and they are expected to preserve the existing behavior in the compiler as far as built-in bounds checks go. The PR adds negative implementations of `Send`/`Sync` for some types and it removes the special cases for `Send`/`Sync` during the trait obligations checks. That is, it now fully relies on the traits check rather than lang items. Once this patch lands and a new snapshot is created, it'll be possible to add default impls for `Send` and `Sync` and remove entirely the use of `BuiltinBound::{BoundSend,BoundSync}` for positive implementations as well. This PR also removes the restriction on negative implementations. That is, it is now possible to add negative implementations for traits other than `Send`/`Sync`
2015-02-22Add negative impls for `*const T` and `*mut T`Flavio Percoco-0/+1
2015-02-20Tweaks to equality comparisons for slices/arrays/vectorsVadim Petrochenkov-0/+3
2015-02-18Stabilize std::borrowAaron Turon-1/+0
This commit stabilizes `std::borrow`, making the following modifications to catch up the API with language changes: * It renames `BorrowFrom` to `Borrow`, as was originally intended (but blocked for technical reasons), and reorders the parameters accordingly. * It moves the type parameter of `ToOwned` to an associated type. This is somewhat less flexible, in that each borrowed type must have a unique owned type, but leads to a significant simplification for `Cow`. Flexibility can be regained by using newtyped slices, which is advisable for other reasons anyway. * It removes the owned type parameter from `Cow`, making the type much less verbose. * Deprecates the `is_owned` and `is_borrowed` predicates in favor of direct matching. The above API changes are relatively minor; the basic functionality remains the same, and essentially the whole module is now marked `#[stable]`. [breaking-change]
2015-02-17Register new snapshotsAlex Crichton-15/+6
2015-02-17Add gating for rustc_* attrsManish Goregaokar-0/+1
2015-02-15Fix rollup (remove slicing_syntax)Manish Goregaokar-1/+1
2015-02-09Set up docs for missing core typesSteve Klabnik-0/+4
Fixes #22085
2015-02-07Feature-gate #![no_std]Keegan McAllister-0/+1
Fixes #21833. [breaking-change]