bors
3ab8054ac1
Auto merge of #34725 - GuillaumeGomez:doc_slice, r=steveklabnik
...
Improve slice docs
Fixes #29337 .
r? @steveklabnik
2016-07-11 07:13:50 -07:00
bors
c73bb9b7d9
Auto merge of #34745 - alexandermerritt:slice-doc, r=brson
...
make docs for clone_from_slice consistent with copy_from_slice
What 'this slice' refers to is not intuitive, given this method can appear in other places, e.g. in docs for Vec.
2016-07-09 21:16:20 -07:00
Alexander Merritt
6a4016933e
make clone_from_slice consistent with copy_from_slice
...
What 'this slice' refers to is not intuitive (we're in the docs for Vec).
2016-07-09 21:50:25 -04:00
Guillaume Gomez
50483d5fa3
Improve slice docs
2016-07-09 11:54:58 +02:00
Guillaume Gomez
a5be0d21c6
Remove useless doc comment for slice
2016-07-08 02:05:39 +02:00
Alex Crichton
3016626c3a
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-03 10:49:01 -07:00
Jeffrey Seyfried
a8751e077f
Rollup merge of #34547 - sanxiyn:pretty-lifetime, r=pnkfelix
...
Fix pretty-printing of lifetime bound
Fix #34527 .
2016-06-30 07:39:32 +00:00
Jeffrey Seyfried
a77a179637
Rollup merge of #34305 - Aaronepower:master, r=alexcrichton
...
Added Default trait for Cow.
Adds a default implementation for Cow. Which is the Owned's default.
2016-06-29 00:39:54 +00:00
Stefan Schindler
6418cb47d4
Add example with leading zeros
2016-06-25 01:59:14 +02:00
bors
4b89debc7b
Auto merge of #34425 - tbu-:pr_len_instead_of_size_hint, r=alexcrichton
...
Use `len` instead of `size_hint` where appropiate
This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.
2016-06-24 09:03:54 -07:00
bors
7189ae3611
Auto merge of #34399 - alexcrichton:issue-audit, r=brson
...
std: Fix up stabilization discrepancies
* Remove the deprecated `CharRange` type which was forgotten to be removed
awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
stabilized as part of #32804
2016-06-24 03:39:47 -07:00
Alex Crichton
c3e8c178ab
std: Fix up stabilization discrepancies
...
* Remove the deprecated `CharRange` type which was forgotten to be removed
awhile back.
* Stabilize the `os::$platform::raw::pthread_t` type which was intended to be
stabilized as part of #32804
2016-06-23 14:08:11 -07:00
Tobias Bucher
8ff5c4394c
Use len
instead of size_hint
where appropiate
...
This makes it clearer that we're not just looking for a lower bound but
rather know that the iterator is an `ExactSizeIterator`.
2016-06-23 12:26:15 +02:00
Aaronepower
703d7b519e
Added Default trait for Cow
2016-06-23 07:05:16 +01:00
Nathan Moos
2a34a7b839
implemented peek_mut and unit tests
2016-06-21 12:10:38 -07:00
Oliver Middleton
fdeda33a9a
Add short summaries to btree modules
...
Also improve hash_map and hash_set module short summaries.
2016-06-17 23:50:34 +01:00
Sean McArthur
217a964027
Map::Entry::take() method to recover key and value together
2016-06-15 05:45:50 -07:00
Andrew Paseltiner
9bf5daca90
Update tracking issue for {BTreeMap, BTreeSet}::{append, split_off}
2016-06-10 17:25:49 -04:00
Seo Sanghyeon
e58c967c86
Rollup merge of #34175 - rwz:patch-2, r=alexcrichton
...
Fix BTreeMap example typo
The whole example is made around movies reviews, but that one line says "review some books".
2016-06-10 21:16:46 +09:00
Seo Sanghyeon
4f6e8f8259
Rollup merge of #34088 - srinivasreddy:rustfmt_map.rs, r=nrc
...
run rustfmt on map.rs in libcollections/btree folder
2016-06-10 21:16:44 +09:00
Pavel Pravosud
8180a910f9
Fix BTreeMap example typo
...
The whole example is made around movies reviews, but that one line says "review some books".
2016-06-08 20:32:24 -07:00
Steve Klabnik
98988ba05e
Rollup merge of #33645 - withoutboats:woboats_trim_matches_doc, r=steveklabnik
...
Correct the docs on str::trim_matches
This pattern cannot be a str because str's pattern is not double-ended.
2016-06-07 10:43:55 -04:00
Srinivas Reddy Thatiparthy
d6560ddd20
run rustfmt on map.rs in libcollections/btree folder
2016-06-05 11:53:44 +05:30
bors
e752aa8b57
Auto merge of #33947 - xosmig:btree_split_off, r=gereeter
...
Implement split_off for BTreeMap and BTreeSet (RFC 509)
Fixes #19986 and refactors common with append methods.
It splits the tree with O(log n) operations and then calculates sizes by traversing the lower one.
CC @gereeter
2016-06-01 21:48:32 -07:00
bors
728eea7dc1
Auto merge of #33853 - alexcrichton:remove-deprecated, r=aturon
...
std: Clean out old unstable + deprecated APIs
These should all have been deprecated for at least one cycle, so this commit
cleans them all out.
2016-06-01 15:11:38 -07:00
Manish Goregaokar
cbfe74c3c8
Rollup merge of #33606 - tshepang:future-talk, r=brson
...
doc: format! may or may not handle streams in future
No need to talk about that here
2016-06-01 12:57:41 +05:30
Andrey Tonkih
e3adad6587
Implement split_off for BTreeMap and BTreeSet (RFC 509)
2016-06-01 10:02:25 +03:00
Alex Crichton
b64c9d5670
std: Clean out old unstable + deprecated APIs
...
These should all have been deprecated for at least one cycle, so this commit
cleans them all out.
2016-05-30 20:46:32 -07:00
Manish Goregaokar
400b9b3242
Rollup merge of #33893 - Ophirr33:docs_string_split_fix, r=GuillaumeGomez
...
Added examples/docs to split in str.rs
Added documentation clarifying the behavior of split when used with the empty string and contiguous separators. Addresses issue [33882](https://github.com/rust-lang/rust/issues/33882 ). This is my first time contributing to rust, so forgive me if I'm skipping any of the contribution steps.
Fixes #33882
2016-05-30 15:19:00 +05:30
Ty Coghlan
feb0b27e41
Added examples/docs to split in str.rs
...
Added documentation clarifying the behavior of split when used with the empty string and contiguous separators.
2016-05-27 17:53:13 -04:00
Guillaume Gomez
caa732a725
Rollup merge of #33858 - liigo:patch-7, r=GuillaumeGomez
...
Point out the clone operation in summary line docs of `Vec::extend_from_slice`
2016-05-27 10:50:03 +02:00
bors
d5759a3417
Auto merge of #33699 - alexcrichton:stabilize-1.10, r=aturon
...
std: Stabilize APIs for the 1.10 release
This commit applies the FCP decisions made by the libs team for the 1.10 cycle,
including both new stabilizations and deprecations. Specifically, the list of
APIs is:
Stabilized:
* `os::windows::fs::OpenOptionsExt::access_mode`
* `os::windows::fs::OpenOptionsExt::share_mode`
* `os::windows::fs::OpenOptionsExt::custom_flags`
* `os::windows::fs::OpenOptionsExt::attributes`
* `os::windows::fs::OpenOptionsExt::security_qos_flags`
* `os::unix::fs::OpenOptionsExt::custom_flags`
* `sync::Weak::new`
* `Default for sync::Weak`
* `panic::set_hook`
* `panic::take_hook`
* `panic::PanicInfo`
* `panic::PanicInfo::payload`
* `panic::PanicInfo::location`
* `panic::Location`
* `panic::Location::file`
* `panic::Location::line`
* `ffi::CStr::from_bytes_with_nul`
* `ffi::CStr::from_bytes_with_nul_unchecked`
* `ffi::FromBytesWithNulError`
* `fs::Metadata::modified`
* `fs::Metadata::accessed`
* `fs::Metadata::created`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
* `SocketAddr::is_unnamed`
* `SocketAddr::as_pathname`
* `UnixStream::connect`
* `UnixStream::pair`
* `UnixStream::try_clone`
* `UnixStream::local_addr`
* `UnixStream::peer_addr`
* `UnixStream::set_read_timeout`
* `UnixStream::set_write_timeout`
* `UnixStream::read_timeout`
* `UnixStream::write_Timeout`
* `UnixStream::set_nonblocking`
* `UnixStream::take_error`
* `UnixStream::shutdown`
* Read/Write/RawFd impls for `UnixStream`
* `UnixListener::bind`
* `UnixListener::accept`
* `UnixListener::try_clone`
* `UnixListener::local_addr`
* `UnixListener::set_nonblocking`
* `UnixListener::take_error`
* `UnixListener::incoming`
* RawFd impls for `UnixListener`
* `UnixDatagram::bind`
* `UnixDatagram::unbound`
* `UnixDatagram::pair`
* `UnixDatagram::connect`
* `UnixDatagram::try_clone`
* `UnixDatagram::local_addr`
* `UnixDatagram::peer_addr`
* `UnixDatagram::recv_from`
* `UnixDatagram::recv`
* `UnixDatagram::send_to`
* `UnixDatagram::send`
* `UnixDatagram::set_read_timeout`
* `UnixDatagram::set_write_timeout`
* `UnixDatagram::read_timeout`
* `UnixDatagram::write_timeout`
* `UnixDatagram::set_nonblocking`
* `UnixDatagram::take_error`
* `UnixDatagram::shutdown`
* RawFd impls for `UnixDatagram`
* `{BTree,Hash}Map::values_mut`
* `<[_]>::binary_search_by_key`
Deprecated:
* `StaticCondvar` - this, and all other static synchronization primitives
below, are usable today through the lazy-static crate on
stable Rust today. Additionally, we'd like the non-static
versions to be directly usable in a static context one day,
so they're unlikely to be the final forms of the APIs in any
case.
* `CONDVAR_INIT`
* `StaticMutex`
* `MUTEX_INIT`
* `StaticRwLock`
* `RWLOCK_INIT`
* `iter::Peekable::is_empty`
Closes #27717
Closes #27720
Closes #30014
Closes #30425
Closes #30449
Closes #31190
Closes #31399
Closes #31767
Closes #32111
Closes #32281
Closes #32312
Closes #32551
Closes #33018
2016-05-25 20:36:09 -07:00
Liigo Zhuang
f5a398d056
Point out the clone operation in summary line docs of Vec::extend_from_slice
2016-05-25 10:09:20 +08:00
Alex Crichton
cae91d7c8c
std: Stabilize APIs for the 1.10 release
...
This commit applies the FCP decisions made by the libs team for the 1.10 cycle,
including both new stabilizations and deprecations. Specifically, the list of
APIs is:
Stabilized:
* `os::windows::fs::OpenOptionsExt::access_mode`
* `os::windows::fs::OpenOptionsExt::share_mode`
* `os::windows::fs::OpenOptionsExt::custom_flags`
* `os::windows::fs::OpenOptionsExt::attributes`
* `os::windows::fs::OpenOptionsExt::security_qos_flags`
* `os::unix::fs::OpenOptionsExt::custom_flags`
* `sync::Weak::new`
* `Default for sync::Weak`
* `panic::set_hook`
* `panic::take_hook`
* `panic::PanicInfo`
* `panic::PanicInfo::payload`
* `panic::PanicInfo::location`
* `panic::Location`
* `panic::Location::file`
* `panic::Location::line`
* `ffi::CStr::from_bytes_with_nul`
* `ffi::CStr::from_bytes_with_nul_unchecked`
* `ffi::FromBytesWithNulError`
* `fs::Metadata::modified`
* `fs::Metadata::accessed`
* `fs::Metadata::created`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange`
* `sync::atomic::Atomic{Usize,Isize,Bool,Ptr}::compare_exchange_weak`
* `collections::{btree,hash}_map::{Occupied,Vacant,}Entry::key`
* `os::unix::net::{UnixStream, UnixListener, UnixDatagram, SocketAddr}`
* `SocketAddr::is_unnamed`
* `SocketAddr::as_pathname`
* `UnixStream::connect`
* `UnixStream::pair`
* `UnixStream::try_clone`
* `UnixStream::local_addr`
* `UnixStream::peer_addr`
* `UnixStream::set_read_timeout`
* `UnixStream::set_write_timeout`
* `UnixStream::read_timeout`
* `UnixStream::write_Timeout`
* `UnixStream::set_nonblocking`
* `UnixStream::take_error`
* `UnixStream::shutdown`
* Read/Write/RawFd impls for `UnixStream`
* `UnixListener::bind`
* `UnixListener::accept`
* `UnixListener::try_clone`
* `UnixListener::local_addr`
* `UnixListener::set_nonblocking`
* `UnixListener::take_error`
* `UnixListener::incoming`
* RawFd impls for `UnixListener`
* `UnixDatagram::bind`
* `UnixDatagram::unbound`
* `UnixDatagram::pair`
* `UnixDatagram::connect`
* `UnixDatagram::try_clone`
* `UnixDatagram::local_addr`
* `UnixDatagram::peer_addr`
* `UnixDatagram::recv_from`
* `UnixDatagram::recv`
* `UnixDatagram::send_to`
* `UnixDatagram::send`
* `UnixDatagram::set_read_timeout`
* `UnixDatagram::set_write_timeout`
* `UnixDatagram::read_timeout`
* `UnixDatagram::write_timeout`
* `UnixDatagram::set_nonblocking`
* `UnixDatagram::take_error`
* `UnixDatagram::shutdown`
* RawFd impls for `UnixDatagram`
* `{BTree,Hash}Map::values_mut`
* `<[_]>::binary_search_by_key`
Deprecated:
* `StaticCondvar` - this, and all other static synchronization primitives
below, are usable today through the lazy-static crate on
stable Rust today. Additionally, we'd like the non-static
versions to be directly usable in a static context one day,
so they're unlikely to be the final forms of the APIs in any
case.
* `CONDVAR_INIT`
* `StaticMutex`
* `MUTEX_INIT`
* `StaticRwLock`
* `RWLOCK_INIT`
* `iter::Peekable::is_empty`
Closes #27717
Closes #27720
cc #27784 (but encode methods still exist)
Closes #30014
Closes #30425
Closes #30449
Closes #31190
Closes #31399
Closes #31767
Closes #32111
Closes #32281
Closes #32312
Closes #32551
Closes #33018
2016-05-24 09:00:39 -07:00
Stefan Schindler
bf8c070bd5
Clarify docs for sort(&mut self)
2016-05-20 17:43:06 +02:00
Eduard-Mihai Burtescu
b4da51a0a3
Rollup merge of #33635 - tshepang:capitalise, r=steveklabnik
...
doc: 'tis the lang, not the reptile
2016-05-16 02:00:20 +03:00
Eduard-Mihai Burtescu
b0c897279e
Rollup merge of #33634 - tshepang:nicer-output, r=steveklabnik
...
doc: improve output
2016-05-16 02:00:19 +03:00
Eduard-Mihai Burtescu
76d50e657b
Rollup merge of #33633 - tshepang:no-effect, r=steveklabnik
...
doc: this statement does not have an effect
2016-05-16 02:00:19 +03:00
Eduard-Mihai Burtescu
9cd83eb15c
Rollup merge of #33605 - tshepang:less-awkward, r=steveklabnik
...
doc: use less awkward and less confusing language
2016-05-16 02:00:19 +03:00
Eduard-Mihai Burtescu
9c745e7feb
Rollup merge of #33604 - tshepang:line-em-up, r=GuillaumeGomez
...
doc: line these comments up
Looks more nice, and same is done with prior examples
2016-05-16 02:00:18 +03:00
Eduard-Mihai Burtescu
752137f9cb
Rollup merge of #33603 - tshepang:no-need, r=apasel422
...
doc: to_string not needed since we gots coercion
2016-05-16 02:00:18 +03:00
Manish Goregaokar
95ace6be43
Rollup merge of #33598 - haikoschol:master, r=alexcrichton
...
doc: Fix comment in std::string::String example code
2016-05-15 20:13:43 +05:30
Without Boats
ae1422391c
Correct the docs on str::trim_matches
...
This pattern cannot be a str because str's pattern is not double-ended.
2016-05-14 17:58:48 -07:00
Tshepang Lekhonkhobe
5c3489204c
doc: format! may or may not handle streams in future
...
No need to talk about that here
2016-05-14 13:28:56 +02:00
Tshepang Lekhonkhobe
e699e12eb0
doc: 'tis the lang, not the reptile
2016-05-14 13:02:28 +02:00
Tshepang Lekhonkhobe
971a3afe48
doc: improve output
2016-05-14 12:35:02 +02:00
Tshepang Lekhonkhobe
deb8165b36
doc: this statement does not have an effect
2016-05-14 11:55:46 +02:00
Tshepang Lekhonkhobe
226cb9c9bd
doc: to_string not needed since we gots coercion
2016-05-12 23:52:05 +02:00
Tshepang Lekhonkhobe
10c984a155
doc: use less awkward and less confusing language
2016-05-12 23:37:17 +02:00
bors
4ec5ce5e44
Auto merge of #33282 - alexcrichton:rustbuild-crate-tests, r=brson
...
rustbuild: Add support for crate tests + doctests
This commit adds support to rustbuild to run crate unit tests (those defined by
`#[test]`) as well as documentation tests. All tests are powered by `cargo test`
under the hood.
Each step requires the `libtest` library is built for that corresponding stage.
Ideally the `test` crate would be a dev-dependency, but for now it's just easier
to ensure that we sequence everything in the right order.
Currently no filtering is implemented, so there's not actually a method of
testing *only* libstd or *only* libcore, but rather entire swaths of crates are
tested all at once.
A few points of note here are:
* The `coretest` and `collectionstest` crates are just listed as `[[test]]`
entires for `cargo test` to naturally pick up. This mean that `cargo test -p
core` actually runs all the tests for libcore.
* Libraries that aren't tested all mention `test = false` in their `Cargo.toml`
* Crates aren't currently allowed to have dev-dependencies due to
rust-lang/cargo#860, but we can likely alleviate this restriction once
workspaces are implemented.
cc #31590
2016-05-12 14:31:54 -07:00