summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2015-08-13Auto merge of #27693 - nagisa:remutex-docs, r=alexcrichtonbors-3/+10
Initial version of PR had an DerefMut implementation, which was later removed because it may cause mutable reference aliasing. Suggest how to implement mutability with reentrant mutex and remove the claim we implement DerefMut.
2015-08-12Fallout in libs -- misc missing bounds uncovered by WF checks.Niko Matsakis-3/+3
2015-08-12Remove all unstable deprecated functionalityAlex Crichton-959/+46
This commit removes all unstable and deprecated functions in the standard library. A release was recently cut (1.3) which makes this a good time for some spring cleaning of the deprecated functions.
2015-08-12Fix ReentrantMutex documentation wrt DerefMutSimonas Kazlauskas-3/+10
Initial version of PR had an DerefMut implementation, which was later removed because it may cause mutable reference aliasing. Suggest how to implement mutability with reentrant mutex and remove the claim we implement DerefMut.
2015-08-11rollup merge of #27679: durka/patch-5Alex Crichton-4/+4
I'm not 100% sure lines 63 and 73 are typos.
2015-08-11rollup merge of #27678: alexcrichton/snapshotsAlex Crichton-186/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-11rollup merge of #27676: alexcrichton/msvc-unwindAlex Crichton-5/+5
This commit leverages the runtime support for DWARF exception info added in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally adds a few minor fixes here and there in the test harness and such to get `make check` entirely passing on 64-bit MSVC: * The invocation of `maketest.py` now works with spaces/quotes in CC * debuginfo tests are disabled on MSVC * A link error for librustc was hacked around (see #27438)
2015-08-11rollup merge of #27674: zaeleus/ios-importsAlex Crichton-3/+5
See https://github.com/rust-lang/rust/issues/27590#issuecomment-128885975.
2015-08-11rollup merge of #27663: tbu-/pr_remove_fixmeAlex Crichton-1/+0
2015-08-11rollup merge of #27622: eefriedman/https-urlAlex Crichton-3/+3
Also fixes a few outdated links.
2015-08-11rollup merge of #27615: GuillaumeGomez/send_syncAlex Crichton-0/+14
Part of #22709. cc @Veedrac r? @bluss
2015-08-12Auto merge of #27615 - GuillaumeGomez:send_sync, r=huonwbors-0/+14
Part of #22709. cc @Veedrac r? @bluss
2015-08-11correct copy/paste typos in stdio.rs commentsAlex Burka-4/+4
I'm not 100% sure lines 63 and 73 are typos.
2015-08-11trans: Re-enable unwinding on 64-bit MSVCAlex Crichton-5/+5
This commit leverages the runtime support for DWARF exception info added in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally adds a few minor fixes here and there in the test harness and such to get `make check` entirely passing on 64-bit MSVC: * The invocation of `maketest.py` now works with spaces/quotes in CC * debuginfo tests are disabled on MSVC * A link error for librustc was hacked around (see #27438)
2015-08-11Register new snapshotsAlex Crichton-186/+0
* Lots of core prelude imports removed * Makefile support for MSVC env vars and Rust crates removed * Makefile support for morestack removed
2015-08-11std: Fix imports for ios targetMichael Macias-3/+5
2015-08-11Add HashSet and HashMap testsGuillaume Gomez-25/+15
2015-08-11Remove unneeded FIXMETobias Bucher-1/+0
2015-08-11Rollup merge of #27651 - tshepang:patch-8, r=GankroManish Goregaokar-1/+1
2015-08-11Rollup merge of #27648 - tshepang:patch-7, r=brsonManish Goregaokar-2/+2
2015-08-11Rollup merge of #27633 - tshepang:patch-6, r=alexcrichtonManish Goregaokar-1/+1
2015-08-11Rollup merge of #27577 - diaphore:trailing-newline-formatmessagew, ↵Manish Goregaokar-3/+7
r=alexcrichton `FormatMessageW` always inserts trailing `\r\n` to system messages which is a minor annoyance when they're fed to `Debug` but can break formatting with `Display`. ```rust fn main() { use std::env; if let Err(err) = env::set_current_dir("???") { println!("{:#?}\n{}", err, err); } } ``` ```_ Error { repr: Os { code: 2, message: "The system cannot find the file specified.\r\n" } } The system cannot find the file specified. (os error 2) ```
2015-08-11Auto merge of #27549 - tshepang:clarity, r=alexcrichtonbors-1/+1
2015-08-11Auto merge of #26818 - sfackler:duration-stabilization, r=aturonbors-60/+49
This commit stabilizes the `std::time` module and the `Duration` type. `Duration::span` remains unstable, and the `Display` implementation for `Duration` has been removed as it is still being reworked and all trait implementations for stable types are de facto stable. This is a [breaking-change] to those using `Duration`'s `Display` implementation. I'm opening this PR as a platform for discussion - there may be some method renaming to do as part of the stabilization process.
2015-08-10Fix doc testSteven Fackler-1/+0
2015-08-10Add back and deprecate old methods.Steven Fackler-0/+17
2015-08-10Stabilize the Duration APISteven Fackler-59/+32
This commit stabilizes the `std::time` module and the `Duration` type. `Duration::span` remains unstable, and the `Display` implementation for `Duration` has been removed as it is still being reworked and all trait implementations for stable types are de facto stable. This is a [breaking-change] to those using `Duration`'s `Display` implementation.
2015-08-10Auto merge of #27338 - alexcrichton:remove-morestack, r=brsonbors-509/+88
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow) r? @brson
2015-08-10Remove morestack supportAlex Crichton-509/+88
This commit removes all morestack support from the compiler which entails: * Segmented stacks are no longer emitted in codegen. * We no longer build or distribute libmorestack.a * The `stack_exhausted` lang item is no longer required The only current use of the segmented stack support in LLVM is to detect stack overflow. This is no longer really required, however, because we already have guard pages for all threads and registered signal handlers watching for a segfault on those pages (to print out a stack overflow message). Additionally, major platforms (aka Windows) already don't use morestack. This means that Rust is by default less likely to catch stack overflows because if a function takes up more than one page of stack space it won't hit the guard page. This is what the purpose of morestack was (to catch this case), but it's better served with stack probes which have more cross platform support and no runtime support necessary. Until LLVM supports this for all platform it looks like morestack isn't really buying us much. cc #16012 (still need stack probes) Closes #26458 (a drive-by fix to help diagnostics on stack overflow)
2015-08-11doc: remove an unneeded distinctionTshepang Lekhonkhobe-1/+1
2015-08-10Auto merge of #27531 - bluss:io-copy-dst, r=alexcrichtonbors-2/+14
std: Allow ?Sized parameters in std::io::copy
2015-08-10doc: success is implied reallyTshepang Lekhonkhobe-2/+2
2015-08-10Add Send/Sync traits on Iter struct in hash/tableGuillaume Gomez-1/+25
2015-08-10Auto merge of #27252 - tbu-:pr_less_transmutes, r=alexcrichtonbors-18/+20
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`. This builds upon #27233.
2015-08-10Auto merge of #27516 - alexcrichton:osx-flaky-zomg, r=brsonbors-0/+4
The investigation into #14232 discovered that it's possible that signal delivery to a newly spawned process is racy on OSX. This test has been failing spuriously on the OSX bots for some time now, so ignore it as we don't currently know a solution and it looks like it may be out of our control.
2015-08-10std: Allow ?Sized parameters in std::io::copyUlrik Sverdrup-2/+14
std::io::copy did not allow passing trait objects directly (only with an extra &mut wrapping).
2015-08-10Revert "Mark round_up_to_next as inline"Tim Neumann-1/+0
This reverts commit febdc3b201bcce1546c88e3be1b956d3f90d3059.
2015-08-10doc: add missing symbolTshepang Lekhonkhobe-1/+1
2015-08-09Use https URLs to refer to rust-lang.org where appropriate.Eli Friedman-3/+3
Also fixes a few outdated links.
2015-08-09Make `str::as_bytes_mut` privateTobias Bucher-3/+3
2015-08-09Make `slice::transmute*` privateTobias Bucher-2/+1
2015-08-09Replace many uses of `mem::transmute` with more specific functionsTobias Bucher-20/+23
The replacements are functions that usually use a single `mem::transmute` in their body and restrict input and output via more concrete types than `T` and `U`. Worth noting are the `transmute` functions for slices and the `from_utf8*` family for mutable slices. Additionally, `mem::transmute` was often used for casting raw pointers, when you can already cast raw pointers just fine with `as`.
2015-08-09Mark round_up_to_next as inlineAriel Ben-Yehuda-0/+1
This speeds up rustc on #25916 from 1.36Â0.022s to 1.326Â0.025s
2015-08-07Trim trailing newline from FormatMessageWdiaphore-3/+7
2015-08-06Auto merge of #27557 - Manishearth:rollup, r=Manishearthbors-0/+2
- Successful merges: #27546, #27550 - Failed merges:
2015-08-06Rollup merge of #27550 - tshepang:missing-info, r=brsonManish Goregaokar-0/+2
2015-08-06doc: add info about the u64 wrapped in ResultTshepang Lekhonkhobe-0/+2
2015-08-06fs: indicate that we only copy regular filesTshepang Lekhonkhobe-1/+1
2015-08-05Better FFI disciplineTamir Duberstein-5/+3
2015-08-05Auto merge of #27393 - alexcrichton:no-std-changes, r=brsonbors-41/+104
This commit is an implementation of [RFC 1184][rfc] which tweaks the behavior of the `#![no_std]` attribute and adds a new `#![no_core]` attribute. The `#![no_std]` attribute now injects `extern crate core` at the top of the crate as well as the libcore prelude into all modules (in the same manner as the standard library's prelude). The `#![no_core]` attribute disables both std and core injection. [rfc]: https://github.com/rust-lang/rfcs/pull/1184 Closes #27394