summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-12-26Fixes compilation errors and adds proposed improvementsBastian Köcher-0/+2
2017-12-26Implements RFC 1937: `?` in `main`Bastian Köcher-1/+124
This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function.
2017-12-26Rollup merge of #46943 - malbarbo:process-test-busybox, r=alexcrichtonkennytm-1/+1
Fix process test when using busybox mkdir busybox mkdir . returns 0 busybox mkdir ./ returns 1
2017-12-26Rollup merge of #46933 - clarcharr:float_docs, r=steveklabnikkennytm-2/+2
Make core::f32/f64 docs match std. For some reason these weren't in sync.
2017-12-25Fix docs mistakeest31-1/+1
2017-12-25Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1bors-3/+3
Convert warning about `*const _` to a future-compat lint #46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change. fixes #46837 tracking issue for the future-compatibility lint: #46906 r? @arielb1
2017-12-24Auto merge of #46789 - Diggsey:command-env-capture, r=dtolnaybors-167/+321
Capture `Command` environment at spawn Fixes #28975 This tracks a set of changes to the environment and then replays them at spawn time.
2017-12-24Minor rewrite of env::current_exe docs; clarify symlinks.Corey Farwell-8/+11
- Update example in ‘security’ section to use hard links, like the linked securityvulns.com example. - Weaken language on symbolic links – indicate behavior is platform-specific Fixes https://github.com/rust-lang/rust/issues/43617.
2017-12-24Capture environment at spawnDiggory Blake-167/+321
2017-12-24Make column macro output 1 based and document itest31-6/+12
2017-12-23Annotate raw pointer target typesChristopher Durham-1/+1
cc https://github.com/rust-lang/rust/issues/46906 cc https://github.com/rust-lang/rust/pull/46914
2017-12-22Expose float from_bits and to_bits in libcore.Clar Charr-6/+4
2017-12-22fix some errors in libstdMichael Hewson-2/+2
2017-12-22Fix process test when using busybox mkdirMarco A L Barbosa-1/+1
busybox mkdir . returns 0 busybox mkdir ./ returns 1
2017-12-21Make core::f32/f64 docs match std.Clar Charr-2/+2
2017-12-22Rollup merge of #46898 - tspiteri:int-overflow-not-underflow, r=steveklabnikkennytm-2/+2
docs: do not call integer overflows as underflows In the API docs, integer overflow is sometimes called underflow. Underflow is really when the magnitude of a floating-point number is too small so the number underflows to subnormal or zero. With integers it is always overflow, even if the expected result is less than the minimum number that can be represented.
2017-12-21Rollup merge of #46853 - GuillaumeGomez:fix-rustdoc-warning, r=QuietMisdreavusGuillaume Gomez-2/+3
Fix some rustdoc warnings r? @QuietMisdreavus cc @steveklabnik
2017-12-21docs: do not call integer overflows as underflowsTrevor Spiteri-2/+2
2017-12-20Fix some rustdoc warningsGuillaume Gomez-2/+3
2017-12-20Rollup merge of #46828 - vi:hash_for_systemtime_instant, r=dtolnaykennytm-11/+34
Add Hash impl for SystemTime and Instant Closes #46670. Not sure how to actually test non-Linux platforms. `rustc --target=i686-pc-windows-gnu --crate-name std --crate-type rlib src/libstd/lib.rs -o q.rlib` works a bit, but for Redox I'm not sure what to do. r? @dtolnay
2017-12-20Rollup merge of #46760 - semarie:openbsd-arm64, r=alexcrichtonkennytm-0/+2
add aarch64-unknown-openbsd support - make liblibc to point to libc with aarch64-unknown-openbsd - make c_char (in std::os::raw) to point to right value r? @alexcrichton currently, I have only tested in crosscompilation environement (openbsd x64_64 -> openbsd aarch64). it produces valid binaries.
2017-12-20Rollup merge of #46671 - varkor:contrib-2, r=KodrAuskennytm-1/+6
Reject superfluous `::` in IPv6 addresses Fixes #46263.
2017-12-20Auto merge of #46508 - clarcharr:duration_extras, r=sfacklerbors-1/+62
Add more Duration methods for consistency. Follow-up to #46507.
2017-12-18Implement `Write` for `Cursor<&mut Vec<T>>`Diggory Blake-32/+58
2017-12-19Add Hash impl for SystemTime and InstantVitaly _Vi Shukela-11/+34
Closes #46670.
2017-12-18Add lossless debug implementation for unix OsStrsDiggory Blake-3/+63
2017-12-17add aarch64-unknown-openbsd supportSébastien Marie-0/+2
- make liblibc to point to libc with aarch64-unknown-openbsd - make c_char (in std::os::raw) to point to right value
2017-12-15Rollup merge of #46710 - xfix:patch-5, r=alexcrichtonSteve Klabnik-3/+0
Remove Sync and Send implementation for RawTable The implementation was introduced when changing hash storage from Unique to *mut, but it was changed back to Unique.
2017-12-14Auto merge of #45002 - oli-obk:miri, r=eddybbors-2/+2
Validate miri against the HIR const evaluator r? @eddyb cc @alexcrichton @arielb1 @RalfJung The interesting parts are the last few functions in `librustc_const_eval/eval.rs` * We warn if miri produces an error while HIR const eval does not. * We warn if miri produces a value that does not match the value produced by HIR const eval * if miri succeeds and HIR const eval fails, nothing is emitted, but we still return the HIR error * if both error, nothing is emitted and the HIR const eval error is returned So there are no actual changes, except that miri is forced to produce the same values as the old const eval. * This does **not** touch the const evaluator in trans at all. That will come in a future PR. * This does **not** cause any code to compile that didn't compile before. That will also come in the future It would be great if someone could start a crater run if travis passes
2017-12-13Remove Sync and Send implementation for RawTableKonrad Borowski-3/+0
The implementation was introduced when changing hash storage from Unique to *mut, but it was changed back to Unique.
2017-12-13Move rust memchr impl to libcoreManish Goregaokar-232/+5
2017-12-12Rename never_type_impls gate to never_typeAndrew Cann-2/+2
2017-12-11Reject superfluous `::` in IPv6 addressesvarkor-1/+6
Fixes #46263.
2017-12-11Add more Duration methods for consistency.Clar Charr-1/+62
2017-12-11Merge remote-tracking branch 'origin/master' into miriOliver Schneider-39/+303
2017-12-10Auto merge of #46232 - canndrew:never-docs, r=QuietMisdreavusbors-0/+128
Add docs for never primitive cc @nikomatsakis, @QuietMisdreavus
2017-12-10Update never_type docs based on feedbackAndrew Cann-1/+2
2017-12-09Use Try syntax for Option in place of macros or matchMatt Brubeck-35/+13
2017-12-08Auto merge of #45837 - SimonSapin:file_read_write, r=dtolnaybors-1/+134
Add read, read_string, and write functions to std::fs New APIs in `std::fs`: ```rust pub fn read<P: AsRef<Path>>(path: P) -> io::Result<Vec<u8>> { … } pub fn read_string<P: AsRef<Path>>(path: P) -> io::Result<String> { … } pub fn write<P: AsRef<Path>, C: AsRef<[u8]>>(path: P, contents: C) -> io::Result<()> { ... } ``` (`read_string` is based on `read_to_string` and so returns an error on non-UTF-8 content.) Before: ```rust use std::fs::File; use std::io::Read; let mut bytes = Vec::new(); File::open(filename)?.read_to_end(&mut bytes)?; do_something_with(bytes) ``` After: ```rust use std::fs; do_something_with(fs::read(filename)?) ```
2017-12-08fs::{read, read_string, write}: add tracking issue numberSimon Sapin-3/+3
2017-12-07Rollup merge of #46416 - liigo:cfg-macro, r=steveklabnikGuillaume Gomez-1/+1
doc: macro `cfg!` evaluating at compile-time
2017-12-06Rename fs::read_utf8 to read_stringSimon Sapin-4/+4
2017-12-06Update miri to rustc changesOliver Schneider-2454/+5628
2017-12-05compile_error example blurbsHavvy-0/+5
2017-12-05No unused macro warning in compile_error example.Havvy-1/+4
2017-12-04Give compile_error macro examplesHavvy-2/+19
2017-12-04Auto merge of #46485 - khuey:cursor-read_exact, r=Manishearthbors-0/+25
Add a specialization of read_exact for Cursor. The read_exact implementation for &[u8] is optimized and usually allows LLVM to reduce a read_exact call for small numbers of bytes to a bounds check and a register load instead of a generic memcpy. On a workload I have that decompresses, deserializes (via bincode), and processes some data, this leads to a 40% speedup by essentially eliminating the deserialization overhead entirely.
2017-12-03Add a specialization of read_exact for Cursor.Kyle Huey-0/+25
The read_exact implementation for &[u8] is optimized and usually allows LLVM to reduce a read_exact call for small numbers of bytes to a bounds check and a register load instead of a generic memcpy. On a workload I have that decompresses, deserializes (via bincode), and processes some data, this leads to a 40% speedup by essentially eliminating the deserialization overhead entirely.
2017-12-03Rollup merge of #46260 - ExpHP:builtin-macro-doc-sync, r=steveklabnikCorey Farwell-6/+14
Make doc stubs for builtin macros reflect existing support for trailing commas This modifies the `macro_rules!` stubs in `std` for some of the compiler builtin macros in order to better reflect their currently supported grammar. To my understanding these stubs have no impact on compiler output whatsoever, and only exist so that they may appear in the documentation. P.S. It is in fact true that `env!` supports trailing commas while `option_env!` currently does not. (I have another issue for this) I don't imagine there's any way to automatically test these stubs, but I did *informally* test the new definitions on the playpen to see that they accept the desired invocations, as well as inspect the updated doc output.
2017-12-02Auto merge of #46382 - alexcrichton:thinlto-default, r=michaelwoeristerbors-2/+20
rustc: Prepare to enable ThinLTO by default This commit *almost* enables ThinLTO and multiple codegen units in release mode by default but is blocked on #46346 now before pulling the trigger.