summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-08-11Fix breakage from previous cherry pickBrian Anderson-1/+0
2015-08-11Fix doc testSteven Fackler-1/+0
2015-08-11Add back and deprecate old methods.Steven Fackler-0/+17
2015-08-11Stabilize the Duration APISteven Fackler-59/+33
This commit stabilizes the `std::time` module and the `Duration` type. `Duration::span` remains unstable, and the `Display` implementation for `Duration` has been removed as it is still being reworked and all trait implementations for stable types are de facto stable. This is a [breaking-change] to those using `Duration`'s `Display` implementation. Conflicts: src/librustc/lib.rs src/libstd/time/duration.rs
2015-08-04Rollup merge of #27398 - tshepang:patch-5, r=steveklabnikManish Goregaokar-3/+3
2015-08-03Auto merge of #27210 - vadimcn:win64-eh-pers, r=alexcrichtonbors-131/+532
After this change, the only remaining symbol we are pulling from libgcc on Win64 is `__chkstk_ms` - the stack probing routine.
2015-08-02Fix compile errors for ARM.Vadim Chugunov-2/+4
2015-08-03Rollup merge of #27473 - brson:stddocs, r=GankroManish Goregaokar-11/+6
This removes some of the more casual language. The only outright goofiness I couldn't bear to remove is "these modules are the bedrock upon which all of Rust is forged, and they have mighty names like `std::slice` and `std::cmp`", which I believe the greatest sentence I have ever created.
2015-08-02std: Tighten up crate docsBrian Anderson-11/+6
2015-08-02Docs: clarify return value of std::io::Seek::seekSimon Sapin-2/+3
2015-07-31trpl: fix link errorFuGangqiang-1/+1
2015-07-31Auto merge of #27370 - alexcrichton:stabilize-easy, r=brsonbors-19/+100
The following APIs were all marked with a `#[stable]` tag: * process::Child::id * error::Error::is * error::Error::downcast * error::Error::downcast_ref * error::Error::downcast_mut * io::Error::get_ref * io::Error::get_mut * io::Error::into_inner * hash::Hash::hash_slice * hash::Hasher::write_{i,u}{8,16,32,64,size}
2015-07-31Auto merge of #26897 - RalfJung:stdin-mut, r=alexcrichtonbors-1/+1
This fixes #26890. To be honest, the local compile-test is still running. This just takes so long. But this looks trivial enough...
2015-07-30Auto merge of #27388 - alexcrichton:remove-curious-inner, r=brsonbors-44/+27
This isn't actually necessary any more with the advent of `$crate` and changes in the compiler to expand macros to `::core::$foo` in the context of a `#![no_std]` crate. The libcore inner module was also trimmed down a bit to the bare bones.
2015-07-30Implement Win64 eh_personality natively.Vadim Chugunov-129/+528
2015-07-30doc: prelude nitsTshepang Lekhonkhobe-3/+3
2015-07-29Auto merge of #27383 - Manishearth:rollup, r=Manishearthbors-23/+19
- Successful merges: #26778, #27232, #27352, #27369, #27373 - Failed merges:
2015-07-29std: Remove the curious inner moduleAlex Crichton-44/+27
This isn't actually necessary any more with the advent of `$crate` and changes in the compiler to expand macros to `::core::$foo` in the context of a `#![no_std]` crate. The libcore inner module was also trimmed down a bit to the bare bones.
2015-07-30Rollup merge of #27373 - alexcrichton:fix-wait-timeout-ms, r=brsonManish Goregaokar-13/+14
The API we're calling requires us to pass an absolute point in time as an argument (`pthread_cond_timedwait`) so we call `gettimeofday` ahead of time to then add the specified duration to. Unfortuantely the current "add the duration" logic forgot to take into account the current time's sub-second precision (e.g. the `tv_usec` field was ignored), causing sub-second duration waits to return spuriously.
2015-07-30Rollup merge of #27369 - brson:realstd, r=alexcrichtonManish Goregaokar-10/+5
Since most lang items are actually defined in core, these hack reexports don't actually do anything useful.
2015-07-29Auto merge of #27368 - alexcrichton:deprecate-net-methods, r=aturonbors-0/+24
These methods are all covered by [RFC 1158] and are currently all available on stable Rust via the [`net2` crate][net2] on crates.io. This commit does not touch the timeout related functions as they're still waiting on `Duration` which is unstable anyway, so punting in favor of the `net2` crate wouldn't buy much. [RFC 1158]: https://github.com/rust-lang/rfcs/pull/1158 [net2]: http://crates.io/crates/net2
2015-07-29std: Fix sub-second Condvar::wait_timeout_msAlex Crichton-13/+14
The API we're calling requires us to pass an absolute point in time as an argument (`pthread_cond_timedwait`) so we call `gettimeofday` ahead of time to then add the specified duration to. Unfortuantely the current "add the duration" logic forgot to take into account the current time's sub-second precision (e.g. the `tv_usec` field was ignored), causing sub-second duration waits to return spuriously.
2015-07-29Rollup merge of #27345 - killercup:patch-15, r=alexcrichtonSteve Klabnik-4/+2
The first paragraph of the docs of the Cursor struct ([src](https://github.com/rust-lang/rust/blob/ff6c6ce917bd6af9c5d9315708ae6be3ba0b7e91/src/libstd/io/cursor.rs#L18-L21)) contains a Markdown link. In listings (like <http://doc.rust-lang.org/nightly/std/io/>), this won't get rendered: ![std__io_-_rust](https://cloud.githubusercontent.com/assets/20063/8925843/5c5281a8-350b-11e5-8c63-09a369d746b0.png) The hotfix would be to change the link by reference: ```rust /// A `Cursor` wraps another type and provides it with a [`Seek`][seek] /// implementation. /// /// [seek]: trait.Seek.html ``` to a direct link: ```rust /// A `Cursor` wraps another type and provides it with a /// [`Seek`](trait.Seek.html) implementation. ``` _I have not tested this as I don't have access to a machine for compiling Rust right now._ (This seems to be a more general issue, but I think I have seen this mentioned before. This PR is just to hotfix on particular occurrence. Rustdoc seems to only read the first paragraph of a doc string for the description in index pages, and _after that_ convert Markdown to HTML.) r? @steveklabnik
2015-07-29Rollup merge of #27342 - steveklabnik:fix_links, r=alexcrichtonSteve Klabnik-2/+2
How embarassing :sob: r? @alexcrichton
2015-07-29Rollup merge of #27341 - steveklabnik:remove_warning, r=alexcrichtonSteve Klabnik-4/+0
This isn't a standard header, and the other docs don't use it, so let's remove it.
2015-07-29Rollup merge of #27327 - steveklabnik:fix_take, r=alexcrichtonSteve Klabnik-1/+1
This only reads five bytes, so don't use a ten byte buffer, that's confusing. r? @alexcrichton
2015-07-29Rollup merge of #27326 - steveklabnik:doc_show_use, r=GankroSteve Klabnik-32/+63
In spirit with https://internals.rust-lang.org/t/should-we-keep-including-obvious-imports-in-code-examples/2217, show the feature flags we're using in examples. (also one instance of 'use')
2015-07-29Auto merge of #27360 - dhuseby:fixing_freebsd_stat_structs_and_tests, ↵bors-67/+124
r=alexcrichton …ebsd 10.1 x86_64 and i686
2015-07-29Auto merge of #27339 - alexcrichton:remove-old-rt, r=brsonbors-44/+3
These aren't really used for anything any more, so there doesn't seem to be much reason to leave them around in the `rt` directory. There was some limiting of threads spawned or tests when run under valgrind, but very little is run under valgrind nowadays so there's also no real use keeping these around.
2015-07-28std: Stabilize a number of small APIsAlex Crichton-19/+100
The following APIs were all marked with a `#[stable]` tag: * process::Child::id * error::Error::is * error::Error::downcast * error::Error::downcast_ref * error::Error::downcast_mut * io::Error::get_ref * io::Error::get_mut * io::Error::into_inner * hash::Hash::hash_slice * hash::Hasher::write_{i,u}{8,16,32,64,size}
2015-07-28std: Remove some old #[cfg(test) hacksBrian Anderson-10/+5
Since most lang items are actually defined in core, these hack reexports don't actually do anything useful.
2015-07-28std: Deprecate extra TcpStream/UdpSocket methodsAlex Crichton-0/+24
These methods are all covered by [RFC 1158] and are currently all available on stable Rust via the [`net2` crate][net2] on crates.io. This commit does not touch the timeout related functions as they're still waiting on `Duration` which is unstable anyway, so punting in favor of the `net2` crate wouldn't buy much. [RFC 1158]: https://github.com/rust-lang/rfcs/pull/1158 [net2]: http://crates.io/crates/net2 Specifically, this commit deprecates: * TcpStream::set_nodelay * TcpStream::set_keepalive * UdpSocket::set_broadcast * UdpSocket::set_multicast_loop * UdpSocket::join_multicast * UdpSocket::set_multicast_time_to_live * UdpSocket::set_time_to_live
2015-07-28Auto merge of #26934 - reem:boxed-slice-clone, r=Gankrobors-9/+1
Closes #25097
2015-07-28Fixes #25155 and fixes #27359 by fixing the stat defines for both freebsd ↵Dave Huseby-67/+124
10.1 x86_64 and i686
2015-07-28Auto merge of #27319 - diaphore:pr_debug_osstr_escape, r=alexcrichtonbors-15/+25
I had to modify some tests : since `wtf8buf_show` and `wtf8_show` were doing the exact same thing, I repurposed `wtf8_show` to `wtf8buf_show_str` which ensures `Wtf8Buf` `Debug`-formats the same as `str`. `write_str_escaped` might also be shared amongst other `fmt` but I just left it there within `Wtf8::fmt` for review.
2015-07-28Auto merge of #27309 - eddyb:snapshot-infdef, r=alexcrichtonbors-11/+4
FreeBSD i386 snapshot is missing, failed tests (possibly spurious). r? @alexcrichton
2015-07-28Implement Clone for Box<[T]> where T: CloneJonathan Reem-9/+1
Closes #25097
2015-07-28IO Docs: Fix Link in Cursor descriptionPascal Hertleif-4/+2
The first paragraph of the docs of the Cursor struct contains a Markdown link. In listings, this won't get rendered. (Rustdoc seems to split off the first paragraph and after that convert Markdown to HTML.)
2015-07-27fix two linksSteve Klabnik-2/+2
How embarassing :sob:
2015-07-27Remove warning header for consistencySteve Klabnik-4/+0
This isn't a standard header, and the other docs don't use it, so let's remove it.
2015-07-28Auto merge of #26914 - alexcrichton:deprecate-easy, r=aturonbors-5/+19
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * box_heap * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-27std: Deprecate a number of unstable featuresAlex Crichton-5/+19
Many of these have long since reached their stage of being obsolete, so this commit starts the removal process for all of them. The unstable features that were deprecated are: * cmp_partial * fs_time * hash_default * int_slice * iter_min_max * iter_reset_fuse * iter_to_vec * map_in_place * move_from * owned_ascii_ext * page_size * read_and_zero * scan_state * slice_chars * slice_position_elem * subslice_offset
2015-07-27std: Remove msvc/valgrind headersAlex Crichton-44/+3
These aren't really used for anything any more, so there doesn't seem to be much reason to leave them around in the `rt` directory. There was some limiting of threads spawned or tests when run under valgrind, but very little is run under valgrind nowadays so there's also no real use keeping these around.
2015-07-27Fix escaping of characters in Debug for OsStrdiaphore-15/+25
Fixes #27211 Fix Debug for {char, str} in core::fmt
2015-07-27Show appropriate feature flags in docsSteve Klabnik-32/+63
2015-07-27Fix buffer length in std::io::takeSteve Klabnik-1/+1
This only reads five bytes, so don't use a ten byte buffer, that's confusing.
2015-07-27Register new snapshots (2015-07-26 a5c12f4).Eduard Burtescu-11/+4
2015-07-27Auto merge of #27310 - akiss77:fix-aarch64-getrandom, r=alexcrichtonbors-1/+3
2015-07-27Auto merge of #27311 - kballard:thread-mod-desc-remove-scoped, r=huonwbors-34/+25
It's deprecated and unsafe, so we shouldn't be encouraging people to use it. Move it to `std::thread::scoped` instead, since it's still useful information to anyone who is using the API.
2015-07-26Remove the module-level documentation for thread::scopedKevin Ballard-34/+25
It's deprecated and unsafe, so we shouldn't be encouraging people to use it. Move it to `std::thread::scoped` instead, since it's still useful information to anyone who is using the API.