about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-06-14Implement RFC 1014Steven Fackler-33/+96
Closes #25977 The various `stdfoo_raw` methods in std::io now return `io::Result`s, since they may not exist on Windows. They will always return `Ok` on Unix-like platforms. [breaking-change]
2015-06-09fix example in comments about demanglingAndrew Straw-1/+1
2015-06-09Auto merge of #26102 - retep998:openoptionsext, r=alexcrichtonbors-17/+17
r? @alexcrichton
2015-06-08Auto merge of #26077 - SimonSapin:patch-6, r=alexcrichtonbors-7/+7
With the latter is provided by the `From` conversion trait, the former is now completely redundant. Their code is identical. Let’s deprecate now and plan to remove in the next cycle. (It’s `#[unstable]`.) r? @alexcrichton CC @nagisa
2015-06-08OpenOptionsExt on Windows: i32 -> u32Peter Atashian-17/+17
Since all those flags are u32 anyway, avoid unnecessary conversions [breaking change] Signed-off-by: Peter Atashian <retep998@gmail.com>
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-7/+7
2015-06-08Auto merge of #25823 - oli-obk:static_to_const_lint, r=alexcrichtonbors-3/+3
r? @eddyb
2015-06-07change some statics to constantsOliver 'ker' Schneider-3/+3
2015-06-05Another small grammar fix for process.rsMartin Pool-1/+1
2015-06-05Doc fix for process.rsMartin Pool-1/+1
File handles are inherited from, not by, the parent process
2015-06-05Rollup merge of #26001 - sae-bom:master, r=alexcrichtonSteve Klabnik-33/+82
fixed build fail on aarch64-android by support aarch64-android raw type definitions
2015-06-04support aarch64-android raw type definitionsSae-bom Kim-33/+82
2015-06-04Rollup merge of #25990 - carols10cents:try-docs, r=nikomatsakisManish Goregaokar-1/+28
The API documentation is not explicit enough that because `try!` returns `Err` early for you, you can only use it in functions that return `Result`. The book mentions this, but if you come across `try!` outside of the book and look it up in the docs, this restriction on the return type of the function is not particularly clear. I seriously had this epiphany a few days ago after working with Rust for MONTHS, and after seeing [a friend have to come to the same realization](http://joelmccracken.github.io/entries/a-simple-web-app-in-rust-pt-2a/), I'd like to save more people from this confusion :) :sparkling_heart:
2015-06-04Rollup merge of #25988 - webmobster:master, r=alexcrichtonManish Goregaokar-0/+4
The priority policy of RWLock is not specified, and the fact there is no policy should probably be specified.
2015-06-03Add priority policy to RWLock API Documentationwebmobster-0/+4
2015-06-03Indent 4 spaces instead of 2Carol Nichols-2/+2
2015-06-03Return Ok(()) instead of Ok()Carol Nichols-2/+2
2015-06-03Use write_all instead of write_lineCarol Nichols-2/+2
2015-06-03Add prelude to get WriteCarol Nichols-0/+1
2015-06-03Improve `try!` docs to make clearer it returns `Result`.Carol Nichols-1/+27
The API documentation is not explicit enough that because `try!` returns `Err` early for you, you can only use it in functions that return `Result`. The book mentions this, but if you come across `try!` outside of the book and look it up in the docs, this restriction on the return type of the function is not particularly clear.
2015-06-03Rollup merge of #25974 - richo:stack-msg, r=alexcrichtonManish Goregaokar-8/+4
These are implemented in asm, they're just not inlined. Open questions are: * Should I just inline them? They're.. big, but it seems as though this needs violates the #[inline(always)] gaurantees the others make. * Does something (llvm?) provide these as intrinsics? The structure of this code suggests that we could be hoisting off something else, instead of flagrantly ignoring it like we do for power and mips.
2015-06-02std: clarify comments about sp* implementationsRicho Healey-8/+4
2015-06-02Rollup merge of #25951 - mbrubeck:nan, r=alexcrichtonManish Goregaokar-0/+8
This is based on the documented behavior of cmath::{fmin,fmax}. It is also tested by existing unit tests in this module.
2015-06-01Auto merge of #25246 - mzabaluev:io-invalid-data, r=alexcrichtonbors-2/+9
This takes the cases from `InvalidInput` where a data format error was encountered. This is different from the documented semantics of `InvalidInput`, which more likely indicate a programming error. Fixes rust-lang/rfcs#906
2015-06-01Document behavior of {f32,f64}::{min,max} on NaNMatt Brubeck-0/+8
This is based on the documented behavior of cmath::{fmin,fmax}. It is also tested by existing unit tests in this module.
2015-06-01Auto merge of #25858 - alexcrichton:disable-os-tls, r=brsonbors-27/+75
This commit adds a ./configure option called `--disable-elf-tls` which disables ELF based TLS (that which is communicated to LLVM) on platforms which already support it. OSX 10.6 does not support this form of TLS, and some users of Rust need to target 10.6 and are unable to do so due to the usage of TLS. The standard library will continue to use ELF based TLS on OSX by default (as the officially supported platform is 10.7+), but this adds an option to compile the standard library in a way that is compatible with 10.6. Closes #25342
2015-05-31Inline hash_table::calculate_offsets, used by iterators.Eduard Burtescu-0/+1
The `HashMap` and `HashSet` iterators use `RawTable::first_bucket_raw` which is generic and will get inlined cross-crate. However, `first_bucket_raw` calls `calculate_offsets` and the call doesn't get inlined, despite being a simple function. This missing `#[inline]` results in `hash_table::calculate_offsets` showing up at the top of a callgrind profile with 3 million calls (for the testcase in #25916).
2015-05-30std::io: bump the stability tag on ErrorKind::InvalidData to 1.2.0Mikhail Zabaluev-1/+1
2015-05-30Auto merge of #25818 - sfackler:socket-timeouts, r=alexcrichtonbors-7/+324
Closes #25619 r? @alexcrichton
2015-05-29Loosen timeout restrictionsSteven Fackler-20/+12
2015-05-29Auto merge of #25494 - alexcrichton:stdio-from-raw, r=aturonbors-59/+243
This commit implements a number of standard traits for the standard library's process I/O handles. The `FromRaw{Fd,Handle}` traits are now implemented for the `Stdio` type and the `AsRaw{Fd,Handle}` traits are now implemented for the `Child{Stdout,Stdin,Stderr}` types. The stability markers for these implementations mention that they are stable for 1.1 as I will nominate this commit for cherry-picking to beta.
2015-05-29std::io: New ErrorKind value InvalidDataMikhail Zabaluev-2/+9
This takes the cases from InvalidInput where a data format error was encountered. This is different from the documented semantics of InvalidInput, which more likely indicate a programming error.
2015-05-29Skip timeout upper bound check on windowsSteven Fackler-4/+12
2015-05-28Implement RFC 1047 - socket timeoutsSteven Fackler-7/+324
Closes #25619
2015-05-29Auto merge of #25816 - sfackler:io-error-delegation, r=alexcrichtonbors-5/+87
The first commit simply forwards `io::Error`'s `cause` implementation to the inner error. The second commit adds accessor methods for the inner error. Method names mirror those used elsewhere like `BufReader`. r? @alexcrichton
2015-05-28Mention UFCS sadness in instability messagesSteven Fackler-3/+6
2015-05-28std: Add an option to disable ELF based TLSAlex Crichton-27/+75
This commit adds a ./configure option called `--disable-elf-tls` which disables ELF based TLS (that which is communicated to LLVM) on platforms which already support it. OSX 10.6 does not support this form of TLS, and some users of Rust need to target 10.6 and are unable to do so due to the usage of TLS. The standard library will continue to use ELF based TLS on OSX by default (as the officially supported platform is 10.7+), but this adds an option to compile the standard library in a way that is compatible with 10.6.
2015-05-28remove references to IoResultSteve Klabnik-1/+1
This is now std::io::Result
2015-05-28Auto merge of #25843 - shepmaster:remove-public-int-and-uint, r=huonwbors-8/+0
2015-05-27Add a test for downcastingSteven Fackler-2/+38
Ergonomics are a bit crappy right now because method resolution isn't smart enough to drop bounds, unfortunately.
2015-05-27Add accessors for io::Error's inner error.Steven Fackler-6/+42
error::Error itself has downcasting methods, so there's no need to duplicate those here.
2015-05-27Delegate io::Error::cause to inner errorSteven Fackler-0/+7
2015-05-27Remove mentions of int / uint from the isize / usize docsJake Goulding-8/+0
2015-05-28Rollup merge of #25668 - steveklabnik:doc_const, r=alexcrichtonManish Goregaokar-0/+54
2015-05-28Rollup merge of #25128 - steveklabnik:gh24816, r=alexcrichtonManish Goregaokar-0/+2
Fixes #24816 r? @alexcrichton
2015-05-27Use `const fn` to abstract away the contents of UnsafeCell & friends.Eduard Burtescu-424/+320
2015-05-26Add note about filesystems to fs::renameSteve Klabnik-0/+2
Fixes #24816
2015-05-26Document std::env::const valuesSteve Klabnik-0/+54
2015-05-25Auto merge of #25767 - mystor:patch-1, r=Gankrobors-6/+4
By the same logic that `mem::forget` is safe, `boxed::into_raw` is actually a safe function. Fixes #25755.
2015-05-25Remove unsafe block around boxed::into_raw() as it is now safeMichael Layzell-6/+4