about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2018-03-13Rollup merge of #48887 - alexcrichton:update-stdsimd, r=kennytmkennytm-0/+2
Update stdsimd module Pulls in a redesigned `std::simd` module as well as a replacement for the `is_target_feature_detected!` macro
2018-03-13Rollup merge of #48201 - NovemberZulu:master, r=steveklabnikkennytm-15/+36
rephrase UnsafeCell doc As shown by discussions on users.rust-lang.org [[1]], [[2]], UnsafeCell doc is not totally clear. I tried to made the doc univocal regarding what is allowed and what is not. The edits are based on my understanding following [[1]]. [1]: https://users.rust-lang.org/t/unsafecell-behavior-details/1560 [2]: https://users.rust-lang.org/t/is-there-a-better-way-to-overload-index-indexmut-for-a-rc-refcell/15591/12
2018-03-12added ascii_ctypes feature to libcore tests module1011X-0/+1
2018-03-12include AsciiExt in tests1011X-1/+2
2018-03-11Update Cargo submoduleAlex Crichton-1/+235
Required moving all fulldeps tests depending on `rand` to different locations as now there's multiple `rand` crates that can't be implicitly linked against.
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-08Merge branch 'master' of github.com:1011X/rust1011X-97/+174
2018-03-08declare ascii test module in core1011X-0/+1
2018-03-08and again :(Maxim Nazarenko-3/+3
2018-03-08tidy. AgainMaxim Nazarenko-2/+2
2018-03-08another rewriteMaxim Nazarenko-15/+31
based on @nikomatsakis texthg
2018-03-08Rollup merge of #48738 - Songbird0:parseinterror_potential_cause, r=joshtriplettManish Goregaokar-0/+7
Add a potential cause raising `ParseIntError`. Initially, I wanted to add it directly to the documentation of `str. parse()` method, I finally found that it was more relevant (I hope so?) to directly document the structure in question. I've added a scenario, in which we could all get caught at least once, to make it easier to diagnose the problem when parsing integers.
2018-03-08Produce instead of pointersOliver Schneider-1/+3
2018-03-07Make `assert` macro a built-in procedural macroShotaro Yamada-0/+15
2018-03-06Stabilize option_ref_mut_clonedMatt Brubeck-2/+1
Closes #43738.
2018-03-06FusedIterator will be stabilized1011X-1/+1
2018-03-06Merge branch 'master' of https://github.com/rust-lang/rust1011X-96/+173
2018-03-06Auto merge of #48768 - kennytm:rollup, r=kennytmbors-92/+169
Rollup of 14 pull requests - Successful merges: #48403, #48432, #48546, #48573, #48590, #48657, #48727, #48732, #48753, #48754, #48761, #48474, #48507, #47463 - Failed merges:
2018-03-06Rollup merge of #47463 - bluss:fused-iterator, r=alexcrichtonkennytm-59/+57
Stabilize FusedIterator FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate. Closes #35602
2018-03-06Rollup merge of #48474 - christianpoveda:new_cell_docs, r=steveklabnikkennytm-0/+18
New Cell docs This fixes https://github.com/rust-lang/rust/issues/44061
2018-03-06Rollup merge of #48590 - tshepang:more-simple, r=frewsxcvkennytm-31/+22
doc: no need for the reference Also, we are well within line length limit
2018-03-06Rollup merge of #48573 - Amanieu:bitreverse2, r=sfacklerkennytm-0/+70
Add functions for reversing the bit pattern in an integer I'm reviving PR #32798 now that the LLVM issues have been resolved. > This adds the bitreverse intrinsic and adds a reverse_bits function to all integer types.
2018-03-06Rollup merge of #48403 - lukaslueg:casted, r=steveklabnikkennytm-2/+2
Fix spelling s/casted/cast/ r? @GuillaumeGomez
2018-03-06Auto merge of #48509 - Phlosioneer:option-doc-change, r=TimNNbors-4/+4
Slight modification to the as_ref example of std::option::Option A user in a reddit thread was confused by the name of the variable "num_as_int"; they thought the example was trying to convert the string "10" as if it were binary 2 by calling str::len(). In reality, the example is simply demonstrating how to take an immutable reference to the value of an Option. The confusion comes from the coincidence that the length of the string "10" is also its binary representation, and the implication from the variable names that a conversion was occuring ("num_as_str" to "num_as_int"). This PR changes the example number to 12 instead of 10, and changes the variable name from "num_as_int" to "num_length" to better communicate what the example is doing. The reddit thread: https://www.reddit.com/r/rust/comments/7zpvev/notyetawesome_rust_what_use_cases_would_you_like/dur39xw/
2018-03-06Add reverse_bits to integer typesAmanieu d'Antras-0/+66
2018-03-05Copy license into libcore/tests/ascii.rs1011X-0/+10
2018-03-05Move tests, re-export items from core::ascii1011X-355/+350
2018-03-05Fix spelling error for `whitespaces`.Songbird0-1/+1
2018-03-05Modify wording and remove useless whitespaces.Songbird0-3/+3
2018-03-04Fix doc example, and change fn annotation to stable1011X-4/+3
2018-03-04Fix doc example1011X-0/+1
2018-03-04Tidy error: add a new lineSongbird0-1/+2
The error was: ``` [00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3848: trailing whitespace [00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3851: line longer than 100 chars [00:05:25] tidy error: /checkout/src/libcore/num/mod.rs:3851: trailing whitespace [00:05:26] some tidy checks failed ``` The line was truncated to 92 characters.
2018-03-04Add a potential cause raising `ParseIntError`.Songbird0-0/+6
Initially, I wanted to add it directly to the documentation of `str. parse()' method, I finally found that it was more relevant (I hope so?) to directly document the structure in question. I've added a scenario, in which we could all get caught at least once, to make it easier to diagnose the problem when parsing integers.
2018-03-04Fix unintended rename and a doc example1011X-1/+3
2018-03-04Declare `ascii` module in libcore/lib.rs1011X-0/+1
2018-03-04Merge branch 'master' of github.com:1011X/rust1011X-4/+29
2018-03-04Added `ascii` module to core1011X-0/+499
2018-03-03Auto merge of #48694 - kennytm:rollup, r=kennytmbors-4/+29
Rollup of 8 pull requests - Successful merges: #48283, #48466, #48569, #48629, #48637, #48680, #48513, #48664 - Failed merges:
2018-03-04Rollup merge of #48513 - alexcrichton:simd, r=JoshTriplettkennytm-4/+29
std: Add `arch` and `simd` modules 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-03-03Auto merge of #48583 - dotdash:jt_assume, r=alexcrichtonbors-15/+9
Backport LLVM fixes for a JumpThreading / assume intrinsic bug This fixes the original cause of #48116 and restores the assume intrinsic that was removed as a workaround. r? @alexcrichton
2018-03-03core: Update stability attributes for FusedIteratorUlrik Sverdrup-59/+57
2018-03-03core: Stabilize FusedIteratorUlrik Sverdrup-58/+58
FusedIterator is a marker trait that promises that the implementing iterator continues to return `None` from `.next()` once it has returned `None` once (and/or `.next_back()`, if implemented). The effects of FusedIterator are already widely available through `.fuse()`, but with stable `FusedIterator`, stable Rust users can implement this trait for their iterators when appropriate.
2018-03-02Rollup merge of #48635 - scottmcm:faster-zip-nth, r=kennytmManish Goregaokar-0/+102
Fixes #47311. r? @nrc
2018-03-02Rollup merge of #48628 - strake:reverse, r=sfacklerManish Goregaokar-1/+1
Fixes #47311. r? @nrc
2018-03-02Rollup merge of #48259 - tinaun:patch-1, r=alexcrichtonManish Goregaokar-78/+30
Fixes #47311. r? @nrc
2018-03-02Stabilize Unsafe Pointer Methodstinaun-78/+30
also minor doc fixes. Closes #43941
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-03-01Fix spelling s/casted/cast/Lukas Lueg-2/+2
2018-03-01Fix bracesScott McMurray-4/+2
2018-03-01Add a Zip::nth test for side effectsScott McMurray-0/+20