about summary refs log tree commit diff
path: root/src/libcore
AgeCommit message (Collapse)AuthorLines
2015-04-26IMO better borrow_mut() documentation on RefCellgareins-1/+1
Previous borrow() is enough to make borrow_mut() panic, no need to have borrow_mut() twice. [This](http://is.gd/woKKAW)
2015-04-24Rollup merge of #24772 - steveklabnik:gh24712, r=alexcrichtonSteve Klabnik-1/+1
FIxes #24712
2015-04-24Remove reference to 'to'Steve Klabnik-1/+1
FIxes #24712
2015-04-22Fix a tiny typo in core::rawRobin Kruppe-1/+1
2015-04-22Remove doc-comment default::Default importsCorey Farwell-9/+0
In 8f5b5f94dcdb9884737dfbc8efd893d1d70f0b14, `default::Default` was added to the prelude, so these imports are no longer necessary.
2015-04-21rollup merge of #24636: alexcrichton/remove-deprecatedAlex Crichton-2164/+400
Conflicts: src/libcore/result.rs
2015-04-21rollup merge of #24541: alexcrichton/issue-24538Alex Crichton-43/+50
This is an implementation of [RFC 1030][rfc] which adds these traits to the prelude and additionally removes all inherent `into_iter` methods on collections in favor of the trait implementation (which is now accessible by default). [rfc]: https://github.com/rust-lang/rfcs/pull/1030 This is technically a breaking change due to the prelude additions and removal of inherent methods, but it is expected that essentially no code breaks in practice. [breaking-change] Closes #24538
2015-04-21std: Bring back f32::from_str_radix as an unstable APIAlex Crichton-239/+175
This API was exercised in a few tests and mirrors the `from_str_radix` functionality of the integer types.
2015-04-21rollup merge of #24661: SimonSapin/fmt-write-charAlex Crichton-0/+17
as accepted in [RFC 526](https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md). Note that this brand new method is marked as **stable**. I judged this safe enough: it’s simple enough that it’s very unlikely to change. Still, I can mark it unstable instead if you prefer. r? @alexcrichton
2015-04-21std: Remove deprecated/unstable num functionalityAlex Crichton-1849/+226
This commit removes all the old casting/generic traits from `std::num` that are no longer in use by the standard library. This additionally removes the old `strconv` module which has not seen much use in quite a long time. All generic functionality has been supplanted with traits in the `num` crate and the `strconv` module is supplanted with the [rust-strconv crate][rust-strconv]. [rust-strconv]: https://github.com/lifthrasiir/rust-strconv This is a breaking change due to the removal of these deprecated crates, and the alternative crates are listed above. [breaking-change]
2015-04-21std: Remove deprecated AsOsStr/Str/AsSlice traitsAlex Crichton-84/+0
Cleaning out more deprecated items
2015-04-21Pick a feature name for write_charSimon Sapin-1/+1
2015-04-21write_char is unlikely to make it for 1.0, it’ll be 1.1Simon Sapin-1/+1
2015-04-21Auto merge of #24620 - pczarn:model-lexer-issues, r=cmrbors-6/+0
Fixes #15679 Fixes #15878 Fixes #15882 Closes #15883
2015-04-21Add a `write_char` method to `std::fmt::Write`Simon Sapin-0/+17
as accepted in [RFC 526](https://github.com/rust-lang/rfcs/blob/master/text/0526-fmt-text-writer.md).
2015-04-21Model lexer: Fix remaining issuesPiotr Czarnecki-6/+0
2015-04-20Rollup merge of #24628 - steveklabnik:gh24173, r=alexcrichtonSteve Klabnik-21/+0
Fixes #24173 These docs could all use examples, so for now, let's just remove the bad one, and when I go over this whole module I'll put in better ones.
2015-04-20Rollup merge of #24627 - steveklabnik:gh24008, r=alexcrichtonSteve Klabnik-13/+13
Fixes #24008.
2015-04-20Auto merge of #24606 - bombless:doc-result, r=alexcrichtonbors-2/+2
Get rid of the confusion that what does "custom" mean in this context.
2015-04-20remove bad example from PartialEq docsSteve Klabnik-21/+0
Fixes #24173
2015-04-20Make iterator struct docs more consistent.Steve Klabnik-13/+13
Fixes #24008.
2015-04-20Improve doc for `Result::unwrap()`York Xiang-2/+2
2015-04-18Indicate keywords are code-like in Fuse::reset_fuse doc commentCorey Farwell-2/+3
2015-04-18Auto merge of #24428 - kwantam:deprecate_unicode_fns, r=alexcrichtonbors-1/+1
This patch 1. renames libunicode to librustc_unicode, 2. deprecates several pieces of libunicode (see below), and 3. removes references to deprecated functions from librustc_driver and libsyntax. This may change pretty-printed output from these modules in cases involving wide or combining characters used in filenames, identifiers, etc. The following functions are marked deprecated: 1. char.width() and str.width(): --> use unicode-width crate 2. str.graphemes() and str.grapheme_indices(): --> use unicode-segmentation crate 3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(), char.compose(), char.decompose_canonical(), char.decompose_compatible(), char.canonical_combining_class(): --> use unicode-normalization crate
2015-04-17std: Add Default/IntoIterator/ToOwned to the preludeAlex Crichton-43/+50
This is an implementation of [RFC 1030][rfc] which adds these traits to the prelude and additionally removes all inherent `into_iter` methods on collections in favor of the trait implementation (which is now accessible by default). [rfc]: https://github.com/rust-lang/rfcs/pull/1030 This is technically a breaking change due to the prelude additions and removal of inherent methods, but it is expected that essentially no code breaks in practice. [breaking-change] Closes #24538
2015-04-17Auto merge of #24500 - pnkfelix:oflo-checked-neg, r=nikomatsakisbors-1/+5
Add conditional overflow-checking to signed negate operator. I argue this can land independently of #24420 , because one can write the implementation of `wrapped_neg()` inline if necessary (as illustrated in two cases on this PR). This needs to go into beta channel.
2015-04-17Rollup merge of #24491 - bluss:rangefull-debug, r=huonwManish Goregaokar-1/+1
Fix Debug impl for RangeFull The Debug impl was using quotes, which was inconsistent: => (.., 1.., 2..3, ..4) (\"..\", 1.., 2..3, ..4) Fix to use just ..
2015-04-17side-step potentially panic'ing negate in `fn abs`.Felix S. Klock II-1/+5
2015-04-17Auto merge of #24512 - steveklabnik:rollup, r=steveklabnikbors-9/+9
- Successful merges: #23782, #24455, #24490, #24493, #24494, #24496, #24498, #24499, #24501, #24502, #24506, #24507, #24508, #24509, #24510 - Failed merges: #24488
2015-04-16Fix broken links in the docsFlorian Hartwig-4/+4
2015-04-16Indicate None is code-like in doc commentsCorey Farwell-5/+5
2015-04-17Auto merge of #24420 - pnkfelix:oflo-api, r=alexcrichtonbors-1/+156
Fill in missing parts of Integer overflow API See todo list at #22020
2015-04-16deprecate Unicode functions that will be moved to crates.iokwantam-1/+1
This patch 1. renames libunicode to librustc_unicode, 2. deprecates several pieces of libunicode (see below), and 3. removes references to deprecated functions from librustc_driver and libsyntax. This may change pretty-printed output from these modules in cases involving wide or combining characters used in filenames, identifiers, etc. The following functions are marked deprecated: 1. char.width() and str.width(): --> use unicode-width crate 2. str.graphemes() and str.grapheme_indices(): --> use unicode-segmentation crate 3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(), char.compose(), char.decompose_canonical(), char.decompose_compatible(), char.canonical_combining_class(): --> use unicode-normalization crate
2015-04-16Fix Debug impl for RangeFullUlrik Sverdrup-1/+1
The Debug impl was using quotes, which was inconsistent: => (.., 1.., 2..3, ..4) ("..", 1.., 2..3, ..4) Fix to use just ..
2015-04-16Auto merge of #23682 - tamird:DRY-is-empty, r=alexcrichtonbors-13/+13
r? @alexcrichton
2015-04-15Rollup merge of #24465 - steveklabnik:intoiteratordocfix, r=alexcrichtonSteve Klabnik-1/+1
2015-04-15Rollup merge of #24440 - nham:improve_enumerate_doc, r=alexcrichtonSteve Klabnik-2/+3
I found that the current description of `enumerate()` doesn't actually tell you what, specifically, the method does, and you have to look at the example to figure it out. Here's a description that I think is better.
2015-04-15Rollup merge of #24435 - killercup:patch-9, r=steveklabnikSteve Klabnik-3/+3
The link works on the `std/ptr/index.html` docs page, but not the `std/primitive.pointer.html` page. Instead of leaving it half-broken, it is removed. I tried fixing this in #24432, but @alexcrichton mentioned that this doc string was used in two places (with different base paths unfortunately). r? @alexcrichton
2015-04-15Describe the Iterator enumerate() method more clearly.Nick Hamann-2/+3
2015-04-15Fix link in intoiterator docsSteve Klabnik-1/+1
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-2/+2
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-11/+11
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14Remove Incorrect Link from std::ptr::null DocsPascal Hertleif-3/+3
The link works on the std::ptr docs page, but not the primitive.ptr.html page. Instead of leaving it half-broken, it is removed.
2015-04-14rollup merge of #24377: apasel422/docsAlex Crichton-113/+113
Conflicts: src/libstd/net/ip.rs src/libstd/sys/unix/fs.rs src/libstd/sys/unix/mod.rs src/libstd/sys/windows/mod.rs
2015-04-14rollup merge of #24379: rkruppe/fmt-negative-zeroAlex Crichton-114/+52
Fixes #20596 by making `Debug` render negative zero with a `-` without affecting the behavior of `Display`. While I was at it, I also removed some dead code from `float_to_str_bytes_common` (the one from `libcore/fmt/float.rs`, not the function of the same name in `libstd/num/strconv.rs`). It had support for different bases, and for negative numbers, but the function is internal to core and the couple places that call it (all in `libcore/fmt/mod.rs`) never use those features: They pass in `num.abs()` and base 10.
2015-04-14rollup merge of #24329: GuillaumeGomez/atomicboolAlex Crichton-0/+20
Fixes #24319.
2015-04-14rollup merge of #24310: alexcrichton/stabilize-utf8-errorAlex Crichton-22/+17
The meaning of each variant of this enum was somewhat ambiguous and it's uncler that we wouldn't even want to add more enumeration values in the future. As a result this error has been altered to instead become an opaque structure. Learning about the "first invalid byte index" is still an unstable feature, but the type itself is now stable.
2015-04-14rollup merge of #24303: alexcrichton/remove-deprecatedAlex Crichton-70/+52
This commit removes these long deprecated modules. Such a nice diff stat!
2015-04-14rollup merge of #24048: frewsxcv/patch-11Alex Crichton-1/+1
Since it doesn't utilize the parameter, it's not very idiomatic since it could just use the `Result::or` method. So this changes the example to utilize the parameter. As far as I can tell, all the numbers in this example are completely arbitrary.
2015-04-14core: Update all Result docsAlex Crichton-70/+52