about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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.
2015-07-26Auto merge of #27267 - tamird:fix-ios-improper-ctypes, r=alexcrichtonbors-3/+4
Fixes #27263.
2015-07-26Fix getrandom syscall number for aarch64-unknown-linux-gnuAkos Kiss-1/+3
2015-07-25Auto merge of #27233 - tbu-:pr_wtf8, r=alexcrichtonbors-12/+20
2015-07-24Fix `improper_ctypes` falloutTamir Duberstein-3/+4
2015-07-24Rollup merge of #27235 - tbu-:pr_catch_panic_doc, r=steveklabnikSteve Klabnik-3/+3
Fixes #27027.
2015-07-24Auto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakisbors-0/+2
Macro desugaring of `in PLACE { BLOCK }` into "simpler" expressions following the in-development "Placer" protocol. Includes Placer API that one can override to integrate support for `in` into one's own type. (See [RFC 809].) [RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md Part of #22181 Replaced PR #26180. Turns on the `in PLACE { BLOCK }` syntax, while leaving in support for the old `box (PLACE) EXPR` syntax (since we need to support that at least until we have a snapshot with support for `in PLACE { BLOCK }`. (Note that we are not 100% committed to the `in PLACE { BLOCK }` syntax. In particular I still want to play around with some other alternatives. Still, I want to get the fundamental framework for the protocol landed so we can play with implementing it for non `Box` types.) ---- Also, this PR leaves out support for desugaring-based `box EXPR`. We will hopefully land that in the future, but for the short term there are type-inference issues injected by that change that we want to resolve separately.
2015-07-24Auto merge of #26583 - eefriedman:lint-ffi, r=nrcbors-8/+9
Makes the lint a bit more accurate, and improves the quality of the diagnostic messages by explicitly returning an error message.
2015-07-23Rewrite the improper_ctypes lint.Eli Friedman-8/+9
Makes the lint a bit more accurate, and improves the quality of the diagnostic messages by explicitly returning an error message. The new lint is also a little more aggressive: specifically, it now rejects tuples, and it recurses into function pointers.
2015-07-24Add unstable attribute to `char::from_u32_unchecked`Tobias Bucher-0/+1
2015-07-23Fix `thread::catch_panic` documentation to mention its return value on successTobias Bucher-3/+3
Fixes #27027.
2015-07-23wtf8, char: Replace uses of `mem::transmute` with more specific functionsTobias Bucher-12/+19
2015-07-22Remove orphaned unsigned_negation lint reference.Eli Friedman-1/+0
2015-07-22Rollup merge of #27170 - steveklabnik:doc_std_io_intoinnererror, r=alexcrichtonSteve Klabnik-1/+73
Mostly adding examples. r? @alexcrichton
2015-07-22Rollup merge of #27167 - steveklabnik:doc_std_io_take, r=alexcrichtonSteve Klabnik-2/+8
Better and more consistent links to their creators.
2015-07-22Rollup merge of #27166 - steveklabnik:doc_std_io_linewriter, r=alexcrichtonSteve Klabnik-3/+120
Beef up the struct docs, add examples for the methods. r? @alexcrichton
2015-07-22Rollup merge of #27164 - steveklabnik:doc_io_utils, r=alexcrichtonSteve Klabnik-1/+16
These provide various special readers, so point their docs to their constructor functions in a manner consistent with everything else. r? @alexcrichton
2015-07-22Rollup merge of #27163 - steveklabnik:doc_std_io_cursor, r=alexcrichtonSteve Klabnik-9/+140
Beef up the docs on the type, as well as adding examples for all methods. r? @alexcrichton
2015-07-22Rollup merge of #27157 - steveklabnik:doc_std_io_iterators, r=alexcrichtonSteve Klabnik-11/+28
Make them all consistent and link up the documentation. r? @alexcrichton
2015-07-22Rollup merge of #27155 - steveklabnik:doc_std_io_buf_writer, r=alexcrichtonSteve Klabnik-5/+97
Mostly through adding examples. r? @alexcrichton I'm going to be doing a bunch of these today, but I figured I'd keep it one PR per struct, since the last 'all the things in one PR' ended up taking a week to actually land.
2015-07-22Improve documentation for std::io::CursorSteve Klabnik-9/+140
Beef up the docs on the type, as well as adding examples for all methods.
2015-07-22Improve documentation for std::io::LineWriterSteve Klabnik-3/+120
Beef up the struct docs, add examples for the methods.
2015-07-22Avoid feature-warnings on stage0.Felix S. Klock II-0/+1
2015-07-22Add feature-gates for desugaring-based `box` and placement-`in`.Felix S. Klock II-0/+1
update test/compile-fail/feature-gate-box-expr.rs to reflect new feature gates. Part of what lands with Issue 22181.
2015-07-22Auto merge of #27176 - alexcrichton:fix-stock-llvm, r=brsonbors-39/+47
This commit moves the IR files in the distribution, rust_try.ll, rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main distribution. There's a few reasons for this change: * LLVM changes its IR syntax from time to time, so it's very difficult to have these files build across many LLVM versions simultaneously. We'll likely want to retain this ability for quite some time into the future. * The implementation of these files is closely tied to the compiler and runtime itself, so it makes sense to fold it into a location which can do more platform-specific checks for various implementation details (such as MSVC 32 vs 64-bit). * This removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo. In the immediate future, however, this commit should restore compatibility with LLVM 3.5 and 3.6.
2015-07-22Improve documentation for std::io::BufWriterSteve Klabnik-5/+97
Mostly through adding examples.
2015-07-22Auto merge of #27172 - alexcrichton:snapshots, r=brsonbors-1/+4
Enables bootstrapping a 32-bit MSVC host compiler! Closes #26602
2015-07-21trans: Move rust_try into the compilerAlex Crichton-39/+47
This commit moves the IR files in the distribution, rust_try.ll, rust_try_msvc_64.ll, and rust_try_msvc_32.ll into the compiler from the main distribution. There's a few reasons for this change: * LLVM changes its IR syntax from time to time, so it's very difficult to have these files build across many LLVM versions simultaneously. We'll likely want to retain this ability for quite some time into the future. * The implementation of these files is closely tied to the compiler and runtime itself, so it makes sense to fold it into a location which can do more platform-specific checks for various implementation details (such as MSVC 32 vs 64-bit). * This removes LLVM as a build-time dependency of the standard library. This may end up becoming very useful if we move towards building the standard library with Cargo. In the immediate future, however, this commit should restore compatibility with LLVM 3.5 and 3.6.
2015-07-21Auto merge of #27073 - alexcrichton:less-proc-fs, r=brsonbors-47/+60
This can fail on linux for various reasons, such as the /proc filesystem not being mounted. There are already many cases where we can't set up stack guards, so just don't worry about this case and communicate that no guard was enabled. I've confirmed that this allows the compiler to run in a chroot without /proc mounted. Closes #22642
2015-07-21Auto merge of #26856 - steveklabnik:gh26475, r=alexcrichtonbors-2/+18
Fixes #26475 I'm not sure this is enough, really, but I'm not totally clear on what specific information would be valuable here. In the original issue, the Java page was pretty decent, but now I can't think of a different way to word it, and copying their prose is of course not acceptable. thoughts @alexcrichton @aturon @aidanhs ?
2015-07-21Expand documentation for IntoInnerErrorSteve Klabnik-1/+73
Mostly adding examples.
2015-07-21Expand a bit on thread::park spurious wakeupsSteve Klabnik-2/+18
Fixes #26475
2015-07-21std: Be resilient to failure in pthread_getattr_npAlex Crichton-47/+60
This can fail on linux for various reasons, such as the /proc filesystem not being mounted. There are already many cases where we can't set up stack guards, so just don't worry about this case and communicate that no guard was enabled. I've confirmed that this allows the compiler to run in a chroot without /proc mounted. Closes #22642
2015-07-21Auto merge of #27171 - steveklabnik:doc_std_io, r=brsonbors-0/+229
This is the landing page for all of io, so we should have more than just a sentence here. r? @alexcrichton and I know @brson has been caring a lot about landing page style docs lately.
2015-07-21Auto merge of #27168 - brson:stdprim, r=steveklabnikbors-204/+461
This makes the primitive descriptions on the front page read properly as descriptions of types and not of the associated modules. Having the primitive and module docs derived from the same source causes problems, primarily that they can't contain hyperlinks cross-referencing each other. This crates dedicated private modules in `std` to document the primitive types, then for all primitives that have a corresponding module, puts hyperlinks in moth the primitive docs and the module docs cross-linking each other. This should help clear up confusion when readers find themselves on the wrong page. This also removes all the duplicate `#[doc(primitive)]` tags in various places (especially core), so the core docs will no longer attempt to document the primitives for now. Seems like an acceptable tradeoff to get some cleanup for std.