about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2015-11-17More docs for FromIteratorSteve Klabnik-16/+132
And modifying IntoIterator for consisntency with it. Part of #29360
2015-11-17Remove claims of dependency-free libcoreSteve Klabnik-1/+4
libcore does have a few deps, like noted in https://github.com/rust-lang/rust/issues/29390 Fixes #29502
2015-11-18Review fixesVadim Petrochenkov-4/+4
2015-11-18Add missing annotations and some testsVadim Petrochenkov-3/+116
2015-11-17Rollup merge of #29874 - steveklabnik:gh29711, r=alexcrichtonManish Goregaokar-0/+18
in their API docs Fixes #29711
2015-11-17Remove 'raw_pointer_derive' lint (#14615)Devon Hollowood-1/+0
2015-11-16Make note about traits that can be derivedSteve Klabnik-0/+18
in their API docs Fixes #29711
2015-11-16Make `min_value()` and `max_value()` const functionsAndrea Canciani-5/+5
2015-11-13Auto merge of #29808 - aphistic:trait-debug-example-fix, r=steveklabnikbors-1/+1
The example given for the manual implementation of the core::fmt::Debug trait doesn't match the output after the code sample. This updates it so it matches.
2015-11-12Fix the manual implementation example for the Debug trait so it matches the ↵Erik Davidson-1/+1
given output
2015-11-12Auto merge of #29712 - Toby-S:patch-1, r=steveklabnikbors-31/+342
Adds `Example` sections to the rest of the integer methods. cc @steveklabnik
2015-11-12Auto merge of #29544 - Ryman:reduce_doc_warnings, r=steveklabnikbors-10/+48
Did this alphabetically, so I didn't see [how `std` was doing things](https://dxr.mozilla.org/rust/source/src/libstd/lib.rs#215) till I was nearly finished. If you prefer to add crate-level-whitelists like std instead of test-level, I can rebase with that strategy. A number of these commits can probably be dropped as the crates don't have much to test, and are deprecated. Let me know which if any to drop! (can also squash after review if desired) r? @steveklabnik
2015-11-12Auto merge of #29770 - ollie27:assert_eq_unsized, r=alexcrichtonbors-1/+1
`format_args!` doesn't support none Sized types so we should just pass it the references to `left_val` and `right_val`. The following works: ```rust assert!([1, 2, 3][..] == vec![1, 2, 3][..]) ``` So I would expect this to as well: ```rust assert_eq!([1, 2, 3][..], vec![1, 2, 3][..]) ``` But it fails with "error: the trait `core::marker::Sized` is not implemented for the type `[_]` [E0277]" I don't know if this change will have any nasty side effects I don't understand.
2015-11-12libcore: deny warnings in doctestsKevin Butler-10/+48
2015-11-12Fix article in Result.map and Result.map_err documentationDanilo Bargen-2/+2
2015-11-12docs: Fix variable nameKohei Hasegawa-6/+6
2015-11-11Allow none Sized types in assert_eq!Oliver Middleton-1/+1
format_args! doesn't support none Sized types so we should just pass it the references to left_val and right_val. This fixes `assert_eq!([1, 2, 3][..], vec![1, 2, 3][..])` for example.
2015-11-10Add examples to methods on integer typesToby Scrace-31/+342
2015-11-10Some cleanup on after #29684Steve Klabnik-14/+13
* wrap to 80 cols * small grammar fix, missing 'the'
2015-11-08Explain that size_hint cannot be trustedStepan Koltsov-0/+23
Same applies to `len()` function of `ExactSizeIterator` trait.
2015-11-07Remove duplicate words from docsAndrew Paseltiner-2/+2
2015-11-06Auto merge of #29643 - petrochenkov:stability5, r=alexcrichtonbors-21/+0
Also remove `stable` stability annotations from inherent impls (There will be a warning for useless stability annotations soon.) r? @Gankro
2015-11-06Remove stability annotations from trait impl itemsVadim Petrochenkov-21/+0
Remove `stable` stability annotations from inherent impls
2015-11-05Tidy `core::marker` doc summariesAndrew Paseltiner-2/+2
2015-11-05Auto merge of #29593 - ben0x539:reflect-doc-comment, r=steveklabnikbors-5/+6
Rustdoc takes the first paragraph as a summary, so having a huge paragraph that ends with introducing an example looked somewhat wrong on the module page.
2015-11-05docs for Reflect: blank line after first sentenceBenjamin Herr-5/+6
Rustdoc takes the first paragraph as a summary, so having a huge paragraph that ends with introducing an example looked somewhat wrong on the module page.
2015-11-05Rollup merge of #29539 - shepmaster:empty-iterator-docs, r=GankroSteve Klabnik-0/+8
2015-11-03Mention what iterator terminators do with an empty iteratorJake Goulding-0/+8
2015-11-03Auto merge of #29459 - tshepang:simplify, r=steveklabnikbors-3/+3
2015-11-01Stop using ok().expect() in Result docsFlorian Hartwig-4/+3
2015-11-01Auto merge of #29316 - GBGamer:change-unchecked-div-generic, r=eddybbors-37/+418
Similarly to the simd intrinsics. I believe this is a better solution than #29288, and I could implement it as well for overflowing_add/sub/mul. Also rename from udiv/sdiv to div, and same for rem.
2015-10-31Minor documentation correctionCole Reynolds-1/+1
Corrects `write_bytes`'s documentation as the parameter name is `val` not `c`.
2015-10-31Check unchecked_div|rem's specialisationNicholas Mazzuca-37/+418
Similarly to the simd intrinsics.
2015-10-31Auto merge of #29480 - apasel422:coerce-unique, r=alexcrichtonbors-0/+4
Closes rust-lang/rfcs#1343.
2015-10-30Implement `CoerceUnsized` for `Unique`Andrew Paseltiner-0/+4
Closes rust-lang/rfcs#1343.
2015-10-30don't use drop_in_place as an intrinsicAlexis Beingessner-2/+2
2015-10-30expose drop_in_place as ptr::drop_in_placeAlexis Beingessner-1/+22
2015-10-29doc: make example more simpleTshepang Lekhonkhobe-3/+3
2015-10-29Auto merge of #29129 - cuviper:impl-from-for-floats, r=alexcrichtonbors-3/+24
This is a spiritual successor to #28921, completing the "upcast" idea from rust-num/num#97.
2015-10-28Rollup merge of #29417 - pmarcelll:assert-doc, r=steveklabnikSteve Klabnik-0/+5
…m message I recently discovered that this is not mentioned in the docs, only in the examples, and it's not evident for people coming from C++ r? @steveklabnik
2015-10-28Comment how the significand limits lossless int->float conversionJosh Stone-0/+4
2015-10-28Auto merge of #29400 - gkoz:phantom_data, r=alexcrichtonbors-0/+7
None
2015-10-28Mention in the docs, that `assert!` has a second version with a custom messageMarcell Pardavi-0/+5
I recently discovered that this is not mentioned in the docs, only in the examples, and it's not evident for people coming from C++ r? @steveklabnik
2015-10-27Adds tons of documentation for IteratorSteve Klabnik-261/+1183
This adds lots of examples, clarifies text, and just generally improves the documentation for Iterator.
2015-10-27Implement Default for PhantomDataGleb Kozyrev-0/+7
2015-10-26Auto merge of #29274 - thepowersgang:issues-29107-const-unsafe-fn-order, ↵bors-2/+2
r=nikomatsakis This PR switches the implemented ordering from `unsafe const fn` (as was in the original RFC) to `const unsafe fn` (which is what the lang team decided on)
2015-10-25Auto merge of #29266 - apasel422:wf, r=alexcrichtonbors-5/+7
Using these traits in an object context previously resulted in an RFC 1214 warning.
2015-10-25Auto merge of #29254 - alexcrichton:stabilize-1.5, r=brsonbors-31/+34
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-31/+34
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25Switch to 'const unsafe fn' ordering (rust-lang/rust#29107)John Hodge-2/+2