about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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
2015-07-20std: Add IntoRaw{Fd,Handle,Socket} traitsAlex Crichton-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-19Fix documentation IP ranges: e.g., 192.0.2.* instead of 192.*.2.*.Ken Tossell-4/+8
Add Ipv4Addr tests to verify doc address checking.
2015-07-18Auto merge of #27088 - tamird:fix-ios-build, r=alexcrichtonbors-6/+4
Fixes #26939.
2015-07-17[ios] std: avoid `result::fold`Tamir Duberstein-6/+4
2015-07-17Rollup merge of #27080 - soderstroff:kristof-patch, r=GankroManish Goregaokar-1/+1
I fixed a single character typo. r? @steveklabnik
2015-07-17Rollup merge of #27069 - Eljay:fix-raw-attr-typo, r=alexcrichtonManish Goregaokar-1/+1
Pretty sure this should apply to the module. r? @alexcrichton
2015-07-16Fixed typoKristof Söderström-1/+1
2015-07-16Merge branch 'doc_io_traits_enums' of https://github.com/steveklabnik/rust ↵Steve Klabnik-58/+601
into rollup_central
2015-07-16More docs for std::io free functions.Steve Klabnik-10/+10
2015-07-16More docs for std::io::WriteSteve Klabnik-12/+114
2015-07-16More docs for std::io::SeekSteve Klabnik-6/+27
2015-07-16More docs for std::io::ReadSteve Klabnik-12/+278
2015-07-16More docs for std::io::BufReadSteve Klabnik-32/+186
2015-07-16Fix typo in stability attribute.Lee Jeffery-1/+1
2015-07-16Rollup merge of #26950 - AlisdairO:memset, r=alexcrichtonManish Goregaokar-0/+166
In general, it's undesirable to have read_to_end use a buffer with uninitialized memory, as that could lead to undefined behaviour in the event of a bad Read implementation. Since we control the implementations of Read for Stdin and File, however, it should be okay for us to specialise them to improve performance. This PR is to do that! Adds some unsafe code to deal with creating the buffers. Since the read_to_end function needed to be used from the io and fs crates, I moved it into a newly-created sys::common::io module. Alternatively we could expose the new read_to_end functions to allow people to create their own read_to_end implementations for code they trust. Benchmarks: Read a 2.5MB file: sys_common::io::tests::bench_init_file ... bench: 27,473,317 ns/iter (+/- 2,490,767) sys_common::io::tests::bench_uninit_file ... bench: 25,611,793 ns/iter (+/- 2,137,387) Read a buffer full of constant values sys_common::io::tests::bench_uninitialized ... bench: 12,877,645 ns/iter (+/- 931,025) sys_common::io::tests::bench_zeroed ... bench: 18,581,082 ns/iter (+/- 1,541,108) So, approx a 7% speedup for file reading, which I think is worthwhile.
2015-07-16Rollup merge of #26977 - brson:stddoc, r=GankroManish Goregaokar-35/+224
Yet another attempt to make the prose on the std crate page clearer and more informative. This does a lot of things: tightens up the opening, adds useful links (including a link to the search bar), offers guidance on how to use the docs, and expands the prelude docs as a useful newbie entrypoint. r? @steveklabnik cc @aturon
2015-07-15Add specializations of read_to_end for Stdin, TcpStream and File,Alisdair Owens-0/+166
allowing them to read into a buffer containing uninitialized data, rather than pay the cost of zeroing.
2015-07-14Address more feedbackBrian Anderson-3/+3
2015-07-14Fix negate_unsigned feature gate checkSimonas Kazlauskas-2/+0
This commit fixes the negate_unsigned feature gate to appropriately account for infered variables. This is technically a [breaking-change].
2015-07-14Address more feedbackBrian Anderson-4/+5
2015-07-14Auto merge of #27024 - bluss:io-drain, r=alexcrichtonbors-8/+2
Use Vec::drain in BufWriter I happened past a comment that asked for functionality that we now have.
2015-07-14Use Vec::drain in BufWriterUlrik Sverdrup-8/+2
I happened past a comment that asked for functionality that we now have.
2015-07-13Address feedbackBrian Anderson-33/+37
2015-07-13Fix local pathBrian Anderson-1/+1
2015-07-13std: Refining crate docsBrian Anderson-33/+217
Yet another attempt to make the prose on the std crate page clearer and more informative. This does a lot of things: tightens up the opening, adds useful links (including a link to the search bar), offers guidance on how to use the docs, and expands the prelude docs as a useful newbie entrypoint.
2015-07-13Auto merge of #26241 - SimonSapin:derefmut-for-string, r=alexcrichtonbors-8/+60
See https://github.com/rust-lang/rfcs/issues/1157
2015-07-13Implement IndexMut for String and str.Simon Sapin-0/+4
... matching the existing Index impls. There is no reason not to if String implement DerefMut. The code removed in `src/librustc/middle/effect.rs` was added in #9750 to prevent things like `s[0] = 0x80` where `s: String`, but I belive became unnecessary when the Index(Mut) traits were introduced.
2015-07-13Add more tests for AsciiExt::is_asciiSimon Sapin-8/+11
2015-07-13Add tests for AsciiExt::make_ascii_*case, including on String.Simon Sapin-0/+45
2015-07-12Auto merge of #26958 - alexcrichton:down-with-thread-dtors, r=brsonbors-2/+19
TLS tests have been deadlocking on the OSX bots for quite some time now and this commit is the result of the investigation into what's going on. It turns out that a value in TLS which is being destroyed (e.g. the destructor is run) can be reset back to the initial state **while the destructor is running** if TLS is re-accessed. To fix this we stop calling drop_in_place on OSX and instead move the data to a temporary location on the stack.
2015-07-12std: Fix a TLS destructor bug on OSXAlex Crichton-2/+19
TLS tests have been deadlocking on the OSX bots for quite some time now and this commit is the result of the investigation into what's going on. It turns out that a value in TLS which is being destroyed (e.g. the destructor is run) can be reset back to the initial state **while the destructor is running** if TLS is re-accessed. To fix this we stop calling drop_in_place on OSX and instead move the data to a temporary location on the stack.
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-1/+1
Fixes #26900
2015-07-12Auto merge of #26965 - bluss:cstring-debug, r=alexcrichtonbors-4/+16
Use escaped byte string representation for CString Debug Faithfully represent the contents of the CString and CStr in their Debug impl, by treating them as byte strings with our default escaping to ascii representation. Add impl Debug for CStr. Fixes #26964.
2015-07-12Rollup merge of #26979 - tshepang:trim, r=GankroManish Goregaokar-4/+0
- It is clear that what follows are re-exports - There aren't so many re-exports that examples should be given
2015-07-12Auto merge of #26972 - jethrogb:patch-1, r=alexcrichtonbors-2/+6
The File object needs to be writable for the set_len to succeed.
2015-07-12Auto merge of #26959 - dhuseby:i686-unknown-freebsd, r=alexcrichtonbors-7/+9
this adds support for i686-unknown-freebsd target.
2015-07-12doc: remove redundant infoTshepang Lekhonkhobe-4/+0
- It is clear that what follows are re-exports - There aren't so many re-exports that examples should be given
2015-07-11Change std::fs::File.set_len example and documentationjethrogb-2/+6
The File object needs to be writable for the truncate to succeed.