about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2015-10-07core: Derive Default for Wrapping<T>Cristi Cobzarenco-1/+1
2015-10-07Alter formatting for words in Option::cloned doc commentCorey Farwell-1/+2
2015-10-07Auto merge of #28877 - sourcefrog:doc-fuse, r=alexcrichtonbors-0/+3
2015-10-06Link from Fuse type docstring to iter.fuse that creates themMartin Pool-0/+3
2015-10-05Fix doc typo in num::{f32,f64}.Jed Davis-2/+2
2015-10-03integer parsing should accept leading plusarthurprs-40/+41
2015-10-03Auto merge of #28818 - Stebalien:fix-iter-chain-order, r=alexcrichtonbors-1/+6
part of #28810
2015-10-02Rollup merge of #28812 - steveklabnik:improve_str_from_utf8_docs, r=brsonSteve Klabnik-5/+119
Our docs were very basic for the various versions of from_utf8, so this commit beefs them up. It also improves docs for the &str variant's error, Utf8Error.
2015-10-02Improve documentation for the from_utf8 familySteve Klabnik-5/+119
Our docs were very basic for the various versions of from_utf8, so this commit beefs them up. It also improves docs for the &str variant's error, Utf8Error.
2015-10-02Auto merge of #28662 - semmaz:fmt-debug, r=alexcrichtonbors-11/+43
fixes #26920
2015-10-02libcore: Chain must exhaust a before b.Steven Allen-1/+6
part of #28810
2015-10-01Implement `size_hint` for `EscapeUnicode`Simon Mazur-4/+20
2015-10-01Remove one level of indirection for slice-based PartialEq implsBjörn Steinbrink-4/+4
Using the comparison operators already refs the operands, so doing it ourselves as well just adds an unnecessary level of indirection.
2015-10-01Auto merge of #28780 - steveklabnik:doc_from_str, r=alexcrichtonbors-0/+15
@marchelzo pointed out on IRC that this doesn't have docs, so, let's change that.
2015-09-30Rollup merge of #28760 - steveklabnik:gh28166, r=alexcrichtonSteve Klabnik-1/+1
Fixes #28166
2015-09-30Add some docs for FromString::from_strSteve Klabnik-0/+15
@marchelzo pointed out on IRC that this doesn't have docs, so, let's change that.
2015-09-30Rollup merge of #28754 - luser:fix-rustdoc-module-links, r=ManishearthSteve Klabnik-9/+9
The links in the rustdoc for several places in fmt were trying to link to the std::fmt module but actually linking to std, which was confusing. While trying to figure out why I noticed that the documentation chapter of the Rust book has examples that show this same bug (although it doesn't seem widespread in practice). r? @steveklabnik
2015-09-30Fix module links from core::fmt::* to go to std::fmtTed Mielczarek-9/+9
2015-09-30Clarify logic instead of using 'vice versa'Steve Klabnik-1/+1
Fixes #28166
2015-09-30Fix module links in std::fmt and the Rust book's documentation chapter.Ted Mielczarek-9/+9
The links in the rustdoc for several places in fmt were trying to link to the std::fmt module but actually linking to std, which was confusing. While trying to figure out why I noticed that the documentation chapter of the Rust book has examples that show this same bug (although it doesn't seem widespread in practice).
2015-09-30Auto merge of #28738 - apasel422:peekable, r=alexcrichtonbors-9/+1
2015-09-30Implement `size_hint` for `EscapeDefault`Simon Mazur-16/+14
2015-09-30Auto merge of #28731 - bluss:by-ref, r=alexcrichtonbors-5/+5
Remove redundant uses of Iterator::by_ref()
2015-09-29Derive `Clone` for `Peekable`Andrew Paseltiner-9/+1
2015-09-29Remove redundant uses of Iterator::by_ref()Ulrik Sverdrup-5/+5
2015-09-29Improve speed of `fmt::Debug` for `str` and `char`Simon Mazur-7/+25
fixes #26920
2015-09-26Rollup merge of #28678 - fhartwig:deref-elide, r=steveklabnikSteve Klabnik-1/+1
The lifetime can be elided here, and I think eliding it makes the example slightly simpler.
2015-09-26Auto merge of #28632 - alexcrichton:update-match-indices, r=Kimundibors-5/+9
This commit updates the `MatchIndices` and `RMatchIndices` iterators to follow the same pattern as the `chars` and `char_indices` iterators. The `matches` iterator currently yield `&str` elements, so the `MatchIndices` iterator now yields the index of the match as well as the `&str` that matched (instead of start/end indexes). cc #27743
2015-09-26Elide lifetime in Deref doc exampleFlorian Hartwig-1/+1
2015-09-26Auto merge of #28615 - sfackler:formatter-methods, r=alexcrichtonbors-7/+29
cc #27726 r? @alexcrichton
2015-09-25Rollup merge of #28652 - SimonSapin:patch-11, r=sanxiynSteve Klabnik-2/+2
Caught by Brian Smith: https://github.com/rust-lang/rust/issues/27774#issuecomment-143154735
2015-09-25Rollup merge of #28637 - SimonSapin:patch-6, r=alexcrichtonSteve Klabnik-2/+2
2015-09-26Add note about Copy for drop()Manish Goregaokar-0/+20
2015-09-25std: Update MatchIndices to return a subsliceAlex Crichton-5/+9
This commit updates the `MatchIndices` and `RMatchIndices` iterators to follow the same pattern as the `chars` and `char_indices` iterators. The `matches` iterator currently yield `&str` elements, so the `MatchIndices` iterator now yields the index of the match as well as the `&str` that matched (instead of start/end indexes). cc #27743
2015-09-25Docs: &A and &mut A are references, not pointersSimon Sapin-2/+2
Caught by Brian Smith: https://github.com/rust-lang/rust/issues/27774#issuecomment-143154735
2015-09-24Auto merge of #28538 - alevy:make_fixedsizearray_unsafe, r=alexcrichtonbors-2/+11
[breaking-change] `FixedSizeArray` is meant to be implemented for arrays of fixed size only, but can be implemented for anything at the moment. Marking the trait unsafe would make it more reasonable to write unsafe code which operates on fixed size arrays of any size. For example, using `uninitialized` to create a fixed size array and immediately filling it with a fixed value is externally safe: ``` pub fn init_with_nones<T, A: FixedSizeArray<Option<T>>>() -> A { let mut res = unsafe { mem::uninitialized() }; for elm in res.as_mut_slice().iter_mut() { *elm = None; } res } ``` But the same code is not safe if `FixedSizeArray` is implemented for other types: ``` struct Foo { foo: usize } impl FixedSizeArray<Option<usize>> for Foo { fn as_slice(&self) -> &[usize] { &[] } fn as_mut_slice(&self) -> &mut [usize] { &mut [] } } ``` now `init_with_nones() : Foo` returns a `Foo` with an undefined value for the field `foo`.
2015-09-24Utf8Error::valid_up_to: make documented semantics more precise/usefulSimon Sapin-2/+2
2015-09-23Add accessors for Formatter flagsSteven Fackler-7/+29
cc #27726
2015-09-23Explain in comment why FixedSizeArray is unsafeAmit Aryeh Levy-0/+9
2015-09-21Make function pointers implement traits for up to 12 parametersManish Goregaokar-0/+7
(12 was chosen to be consistent with what we do for tuples) Fixes #28559
2015-09-20Auto merge of #28539 - rkruppe:shuffle-num-internals, r=alexcrichtonbors-73/+98
Move private bignum module to core::num, because it is not only used in flt2dec. Extract private 80-bit soft-float into new core::num module for the same reason.
2015-09-20Reorganize core::num internalsRobin Kruppe-73/+98
Move private bignum module to core::num, because it is not only used in flt2dec. Extract private 80-bit soft-float into new core::num module for the same reason.
2015-09-19Make FixedSizeArray an unsafe traitAmit Aryeh Levy-2/+2
2015-09-18Overloaded augmented assignmentsJorge Aparicio-0/+528
2015-09-17Rollup merge of #28474 - tshepang:repetition, r=steveklabnikSteve Klabnik-1/+1
It's clear it's the one being documented
2015-09-17Rollup merge of #28314 - tbu-:pr_atomics_are_send, r=brsonSteve Klabnik-0/+3
2015-09-17doc: no need to mention the method by nameTshepang Lekhonkhobe-1/+1
It's clear it's the one being documented
2015-09-16Auto merge of #28436 - ranma42:faster-partialord, r=blussbors-23/+50
This branch improves the performance of Ord and PartialOrd methods for slices compared to the iter-based implementation. Based on the approach used in #26884.
2015-09-16Explain explicit slicing in slice cmp and partial_cmp methodsAndrea Canciani-0/+6
The explicit slicing is needed in order to enable additional range check optimizations in the compiler.
2015-09-16Remove inline attributeAndrea Canciani-2/+0
Be more conservative with inlining.