about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2016-07-17Indicate where `std::slice` structs originate from.Corey Farwell-0/+10
2016-07-17Implement traits for variadic function pointersVadim Petrochenkov-2/+11
2016-07-16Rollup merge of #34838 - steveklabnik:gh33677, r=alexcrichtonGuillaume Gomez-5/+8
Fix up documentation around no_std 1. Fix the sections in the book to have the correct signatures. I've also marked them as `ignore`; there's no way to set the `no_std` feature for libc, so it pulls in the stdlib, so this wasn't even testing the actual thing it was testing. Better to just ignore. 2. Correcting libcore's docs for factual inaccuracy, and add a note about language items. Fixes #33677 r? @alexcrichton
2016-07-16Rollup merge of #34837 - GuillaumeGomez:better_example, r=nagisaGuillaume Gomez-1/+1
Improve float number example r? @nagisa
2016-07-16Rollup merge of #34768 - alexcrichton:issue-audit, r=aturonGuillaume Gomez-8/+8
std: Correct tracking issue for SipHash{13,24} The referenced tracking issue was closed and was actually about changing the algorithm. cc #34767
2016-07-15Fix up documentation around no_stdSteve Klabnik-5/+8
1. Fix the sections in the book to have the correct signatures. I've also marked them as `ignore`; there's no way to set the `no_std` feature for libc, so it pulls in the stdlib, so this wasn't even testing the actual thing it was testing. Better to just ignore. 2. Correcting libcore's docs for factual inaccuracy, and add a note about language items. Fixes #33677
2016-07-15Improve float number exampleGuillaume Gomez-1/+1
2016-07-15Rollup merge of #34804 - GuillaumeGomez:fix_ret, r=steveklabnikGuillaume Gomez-5/+24
Add examples for FpCategory Fixes #29364. r? @steveklabnik
2016-07-15Rollup merge of #34777 - glandium:issue34697, r=GuillaumeGomezGuillaume Gomez-0/+2
doc: Mention that writeln! and println! always use LF Fixes #34697 I'm not really satisfied with the wording, but I didn't have a better idea. Suggestions welcome.
2016-07-14Auto merge of #33907 - strake:decode_utf8, r=alexcrichtonbors-0/+47
add core::char::DecodeUtf8 See [issue](https://github.com/rust-lang/rust/issues/33906)
2016-07-13add core::char::DecodeUtf8M Farkas-Dyck-0/+47
2016-07-13Add examples for FpCategoryggomez-5/+24
2016-07-12std: Clean out deprecated APIsAlex Crichton-33/+0
This primarily removes a lot of `sync::Static*` APIs and rejiggers the associated implementations. While doing this it was discovered that the `is_poisoned` method can actually result in a data race for the Mutex/RwLock primitives, so the inner `Cell<bool>` was changed to an `AtomicBool` to prevent the associated data race. Otherwise the usage/gurantees should be the same they were before.
2016-07-12Rollup merge of #34749 - GuillaumeGomez:any_doc, r=steveklabnikGuillaume Gomez-2/+158
Improve std::any module doc Fixes #29340. r? @steveklabnik
2016-07-12Rollup merge of #34736 - GuillaumeGomez:cells_doc, r=steveklabnikGuillaume Gomez-0/+49
Add missing examples for std::cell types Fixes #29344. r? @steveklabnik
2016-07-12doc: Mention that writeln! and println! always use LFMike Hommey-0/+2
Fixes #34697
2016-07-11std: Correct tracking issue for SipHash{13,24}Alex Crichton-8/+8
The referenced tracking issue was closed and was actually about changing the algorithm. cc #34767
2016-07-11Auto merge of #34686 - alexcrichton:new-stage, r=luqmanabors-1/+0
rustc: Update stage0 to beta-2016-07-06 Hot off the presses, let's update our stage0 compiler!
2016-07-11Add missing examples for std::cell typesGuillaume Gomez-0/+49
2016-07-10Make it nicer from @alexandermerrittubsan-5/+6
2016-07-10Improve std::any module docGuillaume Gomez-2/+158
2016-07-10Switch around Examples and Alternativesubsan-45/+48
2016-07-09Auto merge of #34365 - petrochenkov:deferr, r=eddybbors-1/+1
Some more pattern cleanup and bugfixing The next part of https://github.com/rust-lang/rust/pull/34095 The most significant fixed mistake is definitions for partially resolved associated types not being updated after full resolution. ``` fn f<T: Fn()>(arg: T::Output) { .... } // <- the definition of T::Output was not updated in def_map ``` For this reason unstable associated types of stable traits, like `FnOnce::Output`, could be used in stable code when written in unqualified form. Now they are properly checked, this is a **[breaking-change]** (pretty minor one, but a crater run would be nice). The fix is not to use unstable library features in stable code, alternatively `FnOnce::Output` can be stabilized. Besides that, paths in struct patterns and expressions `S::A { .. }` are now fully resolved as associated types. Such types cannot be identified as structs at the moment, i.e. the change doesn't make previously invalid code valid, but it improves error diagnostics. Other changes: `Def::Err` is supported better (less chances for ICEs for erroneous code), some incorrect error messages are corrected, some duplicated error messages are not reported, ADT definitions are now available through constructor IDs, everything else is cleanup and code audit. Fixes https://github.com/rust-lang/rust/issues/34209 Closes https://github.com/rust-lang/rust/issues/22933 (adds tests) r? @eddyb
2016-07-09Auto merge of #34709 - GuillaumeGomez:primitives, r=steveklabnikbors-0/+32
Improve primitive integers documentation Fixes #29335. r? @steveklabnik
2016-07-08document DoubleEndedIterator::next_backAlex Burka-3/+4
fixes #34726
2016-07-08Improve primitive integers documentationGuillaume Gomez-0/+32
2016-07-08Stabilize `FnOnce::Output` + Fix rebasepetrochenkov-1/+1
2016-07-08Rollup merge of #34688 - GuillaumeGomez:double_ended_iterator, r=steveklabnikManish Goregaokar-6/+12
Improve DoubleEndedIterator examples Fixes #34065. r? @steveklabnik
2016-07-06Rollup merge of #34277 - ollie27:docs_num, r=steveklabnikSteve Klabnik-65/+64
Add/improve num const docs This adds short summaries to all num consts. r? @steveklabnik
2016-07-06Rollup merge of #33265 - tshepang:peek, r=steveklabnikSteve Klabnik-11/+9
doc: some `peek` improvements
2016-07-06rustc: Update stage0 to beta-2016-07-06Alex Crichton-1/+0
Hot off the presses, let's update our stage0 compiler!
2016-07-05Hopefully, it now worksubsan-31/+42
2016-07-05Merge upstream/master: Fix a weird bugubsan-123/+368
2016-07-06Improve DoubleEndedIterator examplesGuillaume Gomez-6/+12
2016-07-05Fix links, change example to englishubsan-19/+8
2016-07-05Tone it down a littleubsan-14/+13
2016-07-05Fix nitsubsan-16/+25
2016-07-06feat: reinterpret `precision` field for stringsEvgeny Safronov-7/+11
This commit changes the behavior of formatting string arguments with both width and precision fields set. Documentation says that the `width` field is the "minimum width" that the format should take up. If the value's string does not fill up this many characters, then the padding specified by fill/alignment will be used to take up the required space. This is true for all formatted types except string, which is truncated down to `precision` number of chars and then all of `fill`, `align` and `width` fields are completely ignored. For example: `format!("{:/^10.8}", "1234567890);` emits "12345678". In the contrast Python version works as the expected: ```python >>> '{:/^10.8}'.format('1234567890') '/12345678/' ``` This commit gives back the `Python` behavior by changing the `precision` field meaning to the truncation and nothing more. The result string *will* be prepended/appended up to the `width` field with the proper `fill` char. However, this is the breaking change. Also updated `std::fmt` docs about string precision. Signed-off-by: Evgeny Safronov <division494@gmail.com>
2016-07-05Fix testsubsan-100/+138
2016-07-04Revert "Revert "Remove the return_address intrinsic.""Eduard Burtescu-6/+0
This reverts commit f698cd3a3663a459e459f530f76adef3eeb815fd.
2016-07-04Auto merge of #34638 - zackmdavis:if_let_over_none_empty_block_arm, r=jseyfriedbors-5/+2
prefer `if let` to match with `None => {}` arm in some places This is a spiritual succesor to #34268 / 8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block. ---- r? @jseyfried
2016-07-03prefer `if let` to match with `None => {}` arm in some placesZack M. Davis-5/+2
This is a spiritual succesor to #34268/8531d581, in which we replaced a number of matches of None to the unit value with `if let` conditionals where it was judged that this made for clearer/simpler code (as would be recommended by Manishearth/rust-clippy's `single_match` lint). The same rationale applies to matches of None to the empty block.
2016-07-03Auto merge of #34530 - alexcrichton:stabilize-1.11, r=aturonbors-117/+362
std: Stabilize APIs for the 1.11.0 release Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes #27739 Closes #27752 Closes #32526 Closes #33444 Closes #34152 cc #34529 (new tracking issue)
2016-07-03std: Stabilize APIs for the 1.11.0 releaseAlex Crichton-117/+362
Although the set of APIs being stabilized this release is relatively small, the trains keep going! Listed below are the APIs in the standard library which have either transitioned from unstable to stable or those from unstable to deprecated. Stable * `BTreeMap::{append, split_off}` * `BTreeSet::{append, split_off}` * `Cell::get_mut` * `RefCell::get_mut` * `BinaryHeap::append` * `{f32, f64}::{to_degrees, to_radians}` - libcore stabilizations mirroring past libstd stabilizations * `Iterator::sum` * `Iterator::product` Deprecated * `{f32, f64}::next_after` * `{f32, f64}::integer_decode` * `{f32, f64}::ldexp` * `{f32, f64}::frexp` * `num::One` * `num::Zero` Added APIs (all unstable) * `iter::Sum` * `iter::Product` * `iter::Step` - a few methods were added to accomodate deprecation of One/Zero Removed APIs * `From<Range<T>> for RangeInclusive<T>` - everything about `RangeInclusive` is unstable Closes #27739 Closes #27752 Closes #32526 Closes #33444 Closes #34152 cc #34529 (new tracking issue)
2016-07-03Auto merge of #34540 - jupp0r:patch-1, r=steveklabnikbors-1/+4
Improve code example for try! This change improves the code example for try!, avoiding to use try! in the example code that shows what code constructs try! can replace.
2016-07-02Make sure the documentation compilesubsan-77/+92
2016-07-02Auto merge of #34580 - eddyb:two-steps-forward-one-step-backwards, r=nagisabors-0/+6
Revert "Remove the return_address intrinsic." This reverts commit b30134dbc3c29cf62a4518090e1389ff26918c19. Servo might want this merged if they don't merge servo/servo#11872 soon. cc @pnkfelix @jdm
2016-07-02Add a new alternativeubsan-0/+23
2016-07-02More nits :Pubsan-4/+4
2016-07-02Fix some other small nitsubsan-4/+4