about summary refs log tree commit diff
path: root/src/libcore/lib.rs
AgeCommit message (Collapse)AuthorLines
2018-04-05Bump the bootstrap compiler to 1.26.0 betaAlex Crichton-5/+0
Holy cow that's a lot of `cfg(stage0)` removed and a lot of new stable language features!
2018-03-31Auto merge of #49481 - SimonSapin:core-heap, r=alexcrichtonbors-0/+4
Move the alloc::allocator module to core::heap This is the `Alloc` trait and its dependencies.
2018-03-30Deprecate signed std::num::NonZeroI* with a call for use casesSimon Sapin-0/+1
2018-03-29Move the alloc::allocator module to core::heapSimon Sapin-0/+4
This is the `Alloc` trait and its dependencies.
2018-03-26Stabilize i128_typeMark Mansi-1/+1
2018-03-15Stabilize `inclusive_range_syntax` language feature.kennytm-1/+1
Stabilize the syntax `a..=b` and `..=b`.
2018-03-14stabilise feature(never_type)Andrew Cann-1/+2
Replace feature(never_type) with feature(exhaustive_patterns). feature(exhaustive_patterns) only covers the pattern-exhaustives checks that used to be covered by feature(never_type)
2018-03-13Auto merge of #48735 - 1011X:master, r=alexcrichtonbors-0/+1
Move ascii::escape_default to libcore As requested in #46409, the `ascii::escape_default` method has been added to the core library. All I did was copy over the `std::ascii` module file, remove the (redundant) `AsciiExt` trait, and change some of the documentation to match. None of the tests were changed. I wasn't sure how to handle the annotations. For `EscapeDefault` and `escape_default()`, I changed them to `#[unstable(feature = "core_ascii", issue = "46409")]`. Is that alright? Or should I leave them as they were?
2018-03-11Update stdsimd moduleAlex Crichton-0/+2
Pulls in a redesigned `std::simd` module as well as a replacement for the `is_target_feature_detected!` macro
2018-03-04Declare `ascii` module in libcore/lib.rs1011X-0/+1
2018-03-02std: Add `arch` and `simd` modulesAlex Crichton-4/+29
This commit imports the `stdsimd` crate into the standard library, creating an `arch` and `simd` module inside of both libcore and libstd. Both of these modules are **unstable** and will continue to be so until RFC 2335 is stabilized. As a brief recap, the modules are organized as so: * `arch` contains all current architectures with intrinsics, for example `std::arch::x86`, `std::arch::x86_64`, `std::arch::arm`, etc. These modules contain all of the intrinsics defined for the platform, like `_mm_set1_epi8`. * In the standard library, the `arch` module also exports a `is_target_feature_detected` macro which performs runtime detection to determine whether a target feature is available at runtime. * The `simd` module contains experimental versions of strongly-typed lane-aware SIMD primitives, to be fully fleshed out in a future RFC. The main purpose of this commit is to start pulling in all these intrinsics and such into the standard library on nightly and allow testing and such. This'll help allow users to easily kick the tires and see if intrinsics work as well as allow us to test out all the infrastructure for moving the intrinsics into the standard library.
2018-02-20add Iterator::flatten and redefine flat_map(f) in terms of map(f).flatten()Mazdak Farrokhzad-0/+1
2018-02-18Auto merge of #47687 - SimonSapin:panic-impl, r=sfacklerbors-0/+1
RFC 2070 part 1: PanicInfo and Location API changes This implements part of https://rust-lang.github.io/rfcs/2070-panic-implementation.html Tracking issue: https://github.com/rust-lang/rust/issues/44489 * Move `std::panic::PanicInfo` and `std::panic::Location` to a new `core::panic` module. The two types and the `std` module were already `#[stable]` and stay that way, the new `core` module is `#[unstable]`. * Add a new `PanicInfo::message(&self) -> Option<&fmt::Arguments>` method, which is `#[unstable]`. * Implement `Display` for `PanicInfo` and `Location`
2018-02-12core::iter::repeat_with: general fixesMazdak Farrokhzad-0/+1
2018-02-05Rollup merge of #47892 - Badel2:const_type_id_of, r=oli-obkkennytm-0/+1
Turn `type_id` into a constant intrinsic https://github.com/rust-lang/rust/issues/27745 The method `get_type_id` in `Any` is intended to support reflection. It's currently unstable in favor of using an associated constant instead. This PR makes the `type_id` intrinsic a constant intrinsic, the same as `size_of` and `align_of`, allowing `TypeId::of` to be a `const fn`, which will allow using an associated constant in `Any`.
2018-02-01Turn `type_id` into a constant intrinsicBadel2-0/+1
Add rustc_const_unstable attribute for `any::TypeId::of` Add test for `const fn TypeId::of`
2018-01-29Move time::Duration to libcoreClar Charr-0/+1
2018-01-23Move PanicInfo and Location to libcoreSimon Sapin-0/+1
Per https://rust-lang.github.io/rfcs/2070-panic-implementation.html
2017-11-29Update bootstrap compilerAlex Crichton-1/+1
Also remove a number of `stage0` annotations and such
2017-11-26Stabilize const-calling existing const-fns in stdSimon Sapin-34/+0
Fixes #46038
2017-11-17add doc_highlight feature flag and testsQuietMisdreavus-0/+18
2017-11-08Auto merge of #45379 - cuviper:unit_from_iter, r=alexcrichtonbors-0/+1
impl FromIterator<()> for () This just collapses all unit items from an iterator into one. This is more useful when combined with higher-level abstractions, like collecting to a `Result<(), E>` where you only care about errors: ```rust use std::io::*; data = vec![1, 2, 3, 4, 5]; let res: Result<()> = data.iter() .map(|x| writeln!(stdout(), "{}", x)) .collect(); assert!(res.is_ok()); ```
2017-10-26Bump to 1.23 and update bootstrapAlex Crichton-18/+17
This commit updates the bootstrap compiler, bumps the version to 1.23, updates Cargo, updates books, and updates crates.io dependencies
2017-10-18impl FromIterator<()> for ()Josh Stone-0/+1
This just collapses all unit items from an iterator into one. This is more useful when combined with higher-level abstractions, like collecting to a `Result<(), E>` where you only care about errors: ```rust use std::io::*; data = vec![1, 2, 3, 4, 5]; let res: Result<()> = data.iter() .map(|x| writeln!(stdout(), "{}", x)) .collect(); assert!(res.is_ok()); ```
2017-09-16change #![feature(const_fn)] to specific gatesAlex Burka-0/+18
2017-08-25*: remove crate_{name,type} attributesTamir Duberstein-2/+0
Fixes #41701.
2017-07-25Bump master to 1.21.0Alex Crichton-2/+0
This commit bumps the master branch's version to 1.21.0 and also updates the bootstrap compiler from the freshly minted beta release.
2017-07-06remove associated_consts feature gateSean McArthur-1/+2
2017-07-02Documentationest31-2/+2
2017-07-02Fix the test failure, add comment, and refactor a little bitest31-5/+0
2017-07-02Output line column info when panickingest31-3/+8
2017-05-12Remove some unused macros from the rust codebaseest31-4/+0
Removes unused macros from: * libcore * libcollections The last use of these two macros was removed in commit b64c9d56700e2c41207166fe8709711ff02488ff when the char_range_at_reverse function was been removed. * librustc_errors Their last use was removed by commits 2f2c3e178325dc1837badcd7573c2c0905fab979 and 11dc974a38fd533aa692cea213305056cd3a6902. * libsyntax_ext * librustc_trans Also, put the otry macro in back/msvc/mod.rs under the same cfg argument as the places that use it.
2017-04-14Use associated constants in core::num::dec2fltRobin Kruppe-0/+1
2017-03-21Implement feature sort_unstableStjepan Glavina-5/+6
2017-02-03Bump version, upgrade bootstrapAlex Crichton-7/+1
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
2017-01-24Remove Reflectest31-1/+0
* Remove the Reflect trait * Remove the "reflect" lang feature
2017-01-08Auto merge of #38679 - alexcrichton:always-deny-warnings, r=nrcbors-1/+1
Remove not(stage0) from deny(warnings) Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-12-30Feature gate the 128 bit typesSimonas Kazlauskas-0/+1
Dangling a carrot in front of a donkey. This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-30Such large. Very 128. Much bits.Simonas Kazlauskas-0/+8
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which understands and supports 128-bit integers throughout. The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported, this strategy is good enough to get past the first bootstrap stages to end up with a fully working 128-bit capable compiler. In order for this strategy to work, number of locations had to be changed to use associated max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?) had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works (former not necessarily producing the right results in stage1). This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-29Remove not(stage0) from deny(warnings)Alex Crichton-1/+1
Historically this was done to accommodate bugs in lints, but there hasn't been a bug in a lint since this feature was added which the warnings affected. Let's completely purge warnings from all our stages by denying warnings in all stages. This will also assist in tracking down `stage0` code to be removed whenever we're updating the bootstrap compiler.
2016-11-30Update the bootstrap compilerAlex Crichton-1/+0
Now that we've got a beta build, let's use it!
2016-10-23Implement ops on `&Wrapping<T>`Cristi Cobzarenco-0/+3
2016-10-12Stabilise `?`Nick Cameron-1/+1
cc [`?` tracking issue](https://github.com/rust-lang/rust/issues/31436)
2016-08-24Use `#[prelude_import]` in `libcore`.Jeffrey Seyfried-0/+5
2016-08-19Remove old stage0 compatibilityBrian Anderson-5/+1
2016-08-17Rollup merge of #35663 - CryZe:no-stdlib, r=ManishearthJonathan Turner-0/+5
Improve `No stdlib` and related Documentation This renames all lang item function names to the ones used in `libstd` and `libpanic_unwind`. It also explains the `eh_unwind_resume` lang item in the `libcore` documentation, where it was missing. A third function is also needed on certain compilation targets, so this was also added to the `No stdlib` documentation.
2016-08-14Improve `No stdlib` and related DocumentationChristopher Serr-0/+5
2016-08-13Rename empty/bang to neverAndrew Cann-1/+1
Split Ty::is_empty method into is_never and is_uninhabited
2016-08-13Minor fixups based on @eddyb's feedbackAndrew Cann-0/+2
Mainly, remove mk_empty() method and replace with tcx.types.empty
2016-08-13Control usage of `!` through a feature gate.Andrew Cann-0/+1
Adds the `bang_type` feature gate. `!` in a non-return-type position now relies on that feature.