about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-08-06doc: add info about the u64 wrapped in ResultTshepang Lekhonkhobe-0/+2
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.
2015-07-21Auto merge of #27150 - retep998:where-are-my-files, r=alexcrichtonbors-9/+15
cc #24570 r? @alexcrichton
2015-07-20Address feedbackBrian Anderson-30/+30
2015-07-20std: Fix compiling the standard library on i686-MSVCAlex Crichton-1/+4
This commit fixes building the standard library with the `i686-pc-windows-msvc` target by correcting an included symbol name to the linker.
2015-07-20Write better docs for std::ioSteve Klabnik-0/+229
This is the landing page for all of io, so we should have more than just a sentence here.
2015-07-20Update docs for take and broadcastSteve Klabnik-2/+8
Better and more consistent links to their creators.
2015-07-20std: Create separate docs for the primitivesBrian Anderson-192/+449
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.
2015-07-20doc: Clean up primitive short descriptionsBrian Anderson-15/+15
This makes the primitive descriptions on the front page read properly as descriptions of types and not of the associated modules.
2015-07-20Document structures in std::io::utilsSteve Klabnik-1/+16
These provide various special readers, so point their docs to their constructor functions in a manner consistent with everything else.
2015-07-20Auto merge of #27064 - alexcrichton:into-raw-os, r=brsonbors-15/+195
This commit is an implementation of [RFC 1174][rfc] which adds three new traits to the standard library: * `IntoRawFd` - implemented on Unix for all I/O types (files, sockets, etc) * `IntoRawHandle` - implemented on Windows for files, processes, etc * `IntoRawSocket` - implemented on Windows for networking types [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1174-into-raw-fd-socket-handle-traits.md Closes #27062
2015-07-20Improve Debug impl for File on WindowsPeter Atashian-9/+15
Adds a path field if a path could be obtained Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-07-20Document iterators in std::ioSteve Klabnik-11/+28
Make them all consistent and link up the documentation.
2015-07-20Auto merge of #27026 - nagisa:overflowing-unsigned, r=pnkfelixbors-2/+0
This commit fixes the negate_unsigned feature gate to appropriately account for inferred variables. This is technically a [breaking-change], but I’d consider it a bug fix. cc @brson for your relnotes. Fixes https://github.com/rust-lang/rust/issues/24676 Fixes #26840 Fixes https://github.com/rust-lang/rust/issues/25206