summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2018-01-10Regression tests for #47175Manish Goregaokar-0/+38
2018-01-10Make double ended string searchers use dependent fingers (fixes #47175)Manish Goregaokar-6/+10
2018-01-01Auto merge of #46735 - Manishearth:memchr-find, r=burntsushibors-84/+519
Use memchr for str::find(char) This is a 10x improvement for searching for characters. This also contains the patches from https://github.com/rust-lang/rust/pull/46713 . Feel free to land both separately or together. cc @mystor @alexcrichton r? @bluss fixes #46693
2018-01-01handle overflow/underflow in index offsetsManish Goregaokar-10/+15
2018-01-01Auto merge of #47064 - kennytm:force-trailing-newlines, r=estebankbors-1/+1
Add a tidy check for missing or too many trailing newlines. I've noticed recently there are lots of review comments requesting to fix trailing newlines. If this is going to be an official style here, it's better to let the CI do this repetitive check.
2017-12-31Auto merge of #46713 - Manishearth:memchr, r=blussbors-1/+260
Use memchr to speed up [u8]::contains 3x None
2017-12-31Use memchr for [i8]::contains as wellManish Goregaokar-0/+8
2017-12-30Optimise min/maxvarkor-4/+4
Swapping the conditions generates more efficient x86 assembly. See https://github.com/rust-lang/rust/pull/46926#issuecomment-354567412.
2017-12-30Add trailing newlines to files which have no trailing newlines.kennytm-1/+1
2017-12-26Rollup merge of #46986 - nvzqz:basic-usage, r=steveklabnikkennytm-0/+8
Add "Basic Usage" to int min_value and max_value docs This adds "Basic Usage:" to the docs of `min_value` and `max_value`, which makes it consistent with docs of other integer methods.
2017-12-26Rollup merge of #46933 - clarcharr:float_docs, r=steveklabnikkennytm-2/+12
Make core::f32/f64 docs match std. For some reason these weren't in sync.
2017-12-25Pass tidy for testsManish Goregaokar-2/+14
2017-12-25Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1bors-2/+2
Convert warning about `*const _` to a future-compat lint #46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change. fixes #46837 tracking issue for the future-compatibility lint: #46906 r? @arielb1
2017-12-24Add "Basic Usage" to int min_value, max_value docsNikolai Vazquez-0/+8
2017-12-23fix doctests in libcoreMichael Hewson-2/+2
2017-12-21Make core::f32/f64 docs match std.Clar Charr-2/+12
2017-12-22Rollup merge of #46898 - tspiteri:int-overflow-not-underflow, r=steveklabnikkennytm-17/+13
docs: do not call integer overflows as underflows In the API docs, integer overflow is sometimes called underflow. Underflow is really when the magnitude of a floating-point number is too small so the number underflows to subnormal or zero. With integers it is always overflow, even if the expected result is less than the minimum number that can be represented.
2017-12-22Rollup merge of #46820 - nodakai:simplify-int-impl, r=alexcrichtonkennytm-151/+52
libcore/num/mod.rs: simplify the int_impl! macro. We can simply use generic intrinsics since cd1848a1a6 by @alexcrichton Also, minimize unsafe blocks.
2017-12-21docs: do not call integer overflows as underflowsTrevor Spiteri-17/+13
2017-12-20Rollup merge of #46870 - ffflorian:fix/slice/typo, r=rkruppekennytm-1/+1
docs(slice): Clarification in binary_search_by This PR ~fixes a small comment typo~ adds some clarification to a half-open interval in the `binary_search_by` function in `slice`.
2017-12-20Rollup merge of #46831 - Diggsey:float-debug-fmt, r=dtolnaykennytm-8/+13
Always `Debug` floats with a decimal point Fixes #30967 r? @dtolnay
2017-12-20Rollup merge of #46517 - notriddle:patch-2, r=BurntSushikennytm-4/+2
Stablize RefCell::{replace, swap} RefCell::replace_with is not stablized in this PR, since it wasn't part of the RFC. CC #43570
2017-12-20docs(slice): Clarify half-open intervalFlorian Keller-1/+1
2017-12-20Auto merge of #46233 - SimonSapin:fmt-debuglist-flags, r=sfacklerbors-43/+134
Make fmt::DebugList and friends forward formatting parameters For example, formatting slice of integers with `{:04?}` should zero-pad each integer. This also affects every use of `#[derive(Debug)]`.
2017-12-19Auto merge of #46749 - SimonSapin:exorcism, r=nikomatsakisbors-23/+12
Move PhantomData<T> from Shared<T> to users of both Shared and #[may_dangle] After discussing https://github.com/rust-lang/rust/issues/27730#issuecomment-316432083 today with @pnkfelix and @Gankro, we concluded that it’s ok for drop checking not to be much smarter than the current `#[may_dangle]` design which requires an explicit unsafe opt-in.
2017-12-19Always print floats with a decimal point with the Debug formatterDiggory Blake-8/+13
2017-12-18Add stresstests for shared bytes for pattern APIManish Goregaokar-1/+153
2017-12-19libcore/num/mod.rs: simplify the int_impl! macro.NODA, Kai-151/+52
We can simply use generic intrinsics since cd1848a1a6 Also, minimize unsafe blocks. Signed-off-by: NODA, Kai <nodakai@gmail.com>
2017-12-18Add simple search test for pattern APIManish Goregaokar-0/+24
2017-12-18Add simple test for pattern APIManish Goregaokar-0/+78
2017-12-18Add memchr search support for multibyte charactersManish Goregaokar-48/+102
2017-12-17Display binary notation for numeric swap_bytes methods.Corey Farwell-6/+12
This better illustrates what's happening to the bits behind the scenes.
2017-12-16Fill in reverse searcher impl for charManish Goregaokar-6/+50
2017-12-16Move PhantomData<T> from Shared<T> to users of both Shared and #[may_dangle]Simon Sapin-23/+12
After discussing [1] today with @pnkfelix and @Gankro, we concluded that it’s ok for drop checking not to be much smarter than the current `#[may_dangle]` design which requires an explicit unsafe opt-in. [1] https://github.com/rust-lang/rust/issues/27730#issuecomment-316432083
2017-12-15Rollup merge of #46737 - tshepang:better, r=steveklabnikSteve Klabnik-10/+7
doc: a better example Closes #46734
2017-12-15Rollup merge of #46601 - matthewjasper:method-link-change, r=steveklabnikSteve Klabnik-4/+4
Use a better link for method resolution in Deref docs rust-lang-nursery/reference#149 breaks these links, so make them point to somewhere which won't break and provides a more deatailed description of method resolution. cc @Havvy r? @steveklabnik
2017-12-15doc: a better exampleTshepang Lekhonkhobe-10/+7
Closes #46734
2017-12-13Fill in forward searcher impl for charManish Goregaokar-13/+65
2017-12-13Move CharSearcher to its own section in the fileManish Goregaokar-83/+84
2017-12-13Split out char searcher from MultiCharSearcherManish Goregaokar-29/+58
2017-12-13Remove the unused ascii_only field in CharEqSearcherManish Goregaokar-16/+0
2017-12-13Support 16 bit platformsManish Goregaokar-0/+6
2017-12-13Use memchr in [u8]::containsManish Goregaokar-1/+17
2017-12-13Move rust memchr impl to libcoreManish Goregaokar-0/+229
2017-12-12Auto merge of #46647 - varkor:contrib-1, r=sfacklerbors-0/+8
Add `std::fmt::Pointer` implementation for `AtomicPtr` Resolves #29212.
2017-12-12Auto merge of #46250 - canndrew:rename-never-type-impl-gate, r=petrochenkovbors-6/+6
Rename never_type_impls gate We no longer need a separately-named `never_type_impls` gate thanks to https://github.com/rust-lang/rust/issues/43089.
2017-12-12Rename never_type_impls gate to never_typeAndrew Cann-6/+6
2017-12-12Auto merge of #46411 - rillian:str_ascii, r=kennytmbors-6/+6
Mark ascii methods on primitive types stable in 1.23.0 not 1.21.0. The ascii_methods_on_intrinsics feature stabilization didn't land in time for 1.21.0. Update the annotation so the documentation is correct about when these methods became available.
2017-12-10Add `std::fmt::Pointer` implementation for `AtomicPtr`varkor-0/+8
Resolves #29212.
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-5/+4