about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2017-06-24Stabilize ThreadIdSteven Fackler-8/+2
Closes #21507
2017-06-24Stabilize OsString::shrink_to_fitSteven Fackler-3/+1
Closes #40421
2017-06-24Stabilize Command::envsSteven Fackler-3/+1
Closes #38526
2017-06-24Move global vars changing tests into run-passStepan Koltsov-81/+1
Should fix race #42795
2017-06-24Auto merge of #42854 - razielgn:relaxed-debug-constraints-on-maps-iterators, ↵bors-2/+2
r=sfackler Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}. I has hit by this yesterday too. 😄 And I've realised that Debug for BTreeMap::{Keys,Values} wasn't formatting just keys and values respectively, but the whole map. 🤔 Fixed #41924 r? @jonhoo
2017-06-24Auto merge of #42687 - alexcrichton:windows-tls, r=sfacklerbors-109/+140
rustc: Enable #[thread_local] for Windows I think LLVM has had support for quite some time now for this, we just never got around to testing it out and binding it. We've had some trouble landing this in the past I believe, but it's time to try again! This commit flags the `#[thread_local]` attribute as being available for Windows targets and adds an implementation of `register_dtor` in the `thread::local` module to ensure we can destroy these keys. The same functionality is implemented in clang via a function called `__tlregdtor` (presumably provided in some Windows runtime somewhere), but this function unfortunately does not take a data pointer (just a thunk) which means we can't easily call it. For now destructors are just run in the same way the Linux fallback is implemented, which is just keeping track via a single OS-based TLS key.
2017-06-23rustc: Enable #[thread_local] for WindowsAlex Crichton-109/+140
I think LLVM has had support for quite some time now for this, we just never got around to testing it out and binding it. We've had some trouble landing this in the past I believe, but it's time to try again! This commit flags the `#[thread_local]` attribute as being available for Windows targets and adds an implementation of `register_dtor` in the `thread::local` module to ensure we can destroy these keys. The same functionality is implemented in clang via a function called `__tlregdtor` (presumably provided in some Windows runtime somewhere), but this function unfortunately does not take a data pointer (just a thunk) which means we can't easily call it. For now destructors are just run in the same way the Linux fallback is implemented, which is just keeping track via a single OS-based TLS key.
2017-06-23Rollup merge of #42822 - ChrisMacNaughton:guard-traits, r=alexcrichtonMark Simulacrum-0/+21
Ensure Guard types impl Display & Debug Fixes #24372
2017-06-23Rollup merge of #42783 - ids1024:redox-env, r=sfacklerMark Simulacrum-1/+1
Redox: Use create() instead of open() when setting env variable See https://github.com/redox-os/kernel/pull/25.
2017-06-23Relax Debug constraints when debugging {HashMap,BTreeMap}::{Keys,Values}.Federico Ravasio-2/+2
Fixed #41924.
2017-06-23Removed as many "```ignore" as possible.kennytm-45/+76
Replaced by adding extra imports, adding hidden code (`# ...`), modifying examples to be runnable (sorry Homura), specifying non-Rust code, and converting to should_panic, no_run, or compile_fail. Remaining "```ignore"s received an explanation why they are being ignored.
2017-06-22Fix Redox build, broken in ecbb896b9eb2acadefde57be493e4298c1aa04a3Ian Douglas Scott-3/+2
2017-06-22Fix NaN handling in is_sign_negative/positiveSimonas Kazlauskas-34/+16
See #42425
2017-06-22Ensure Guard types impl Display & DebugChris MacNaughton-0/+21
Fixes #24372
2017-06-22Auto merge of #42824 - Mark-Simulacrum:rollup, r=Mark-Simulacrumbors-1/+1
Rollup of 4 pull requests - Successful merges: #42799, #42804, #42805, #42806 - Failed merges:
2017-06-22Rollup merge of #42799 - leodasvacas:impl-clone-for-default-hasher, r=sfacklerMark Simulacrum-1/+1
Impl Clone for DefaultHasher It's useful for a hasher to be `Clone`. It's also strange for any type to not be `Clone`. `DefaultHasher` is not meant to be used directly, but being in std it can be useful as a placeholder. I don't see any forward compatibility hazard if the hasher is changed since it's very rare for something to not be `Clone`.
2017-06-22Auto merge of #42798 - stepancheg:args-debug, r=sfacklerbors-2/+59
Better Debug for Args and ArgsOs Display actual args instead of two dots.
2017-06-21Rollup merge of #42620 - wesleywiser:compile_error, r=brsonCorey Farwell-0/+10
Add compile_error! Related to #40872
2017-06-21Rollup merge of #42397 - sfackler:syncsender-sync, r=alexcrichtonCorey Farwell-5/+0
Implement Sync for SyncSender r? @alexcrichton
2017-06-21Impl Clone for DefaultHasherLeonardo Yvens-1/+1
2017-06-21Better Debug for Args and ArgsOsStepan Koltsov-2/+59
Display actual args instead of two dots.
2017-06-20Add `Read::initializer`.Steven Fackler-269/+215
This is an API that allows types to indicate that they can be passed buffers of uninitialized memory which can improve performance.
2017-06-21Update version numbers for From implsOliver Middleton-3/+3
2017-06-21Convert Intos to Froms.Clar Charr-9/+9
2017-06-20Redox: Use create() instead of open() when setting env variableIan Douglas Scott-1/+1
2017-06-20Rollup merge of #42749 - frewsxcv:frewsxcxv/doc-examples, r=QuietMisdreavusCorey Farwell-0/+172
Additions/improvements for doc examples. None
2017-06-20Rollup merge of #42271 - tinaun:charfromstr, r=alexcrichtonCorey Farwell-0/+9
add `FromStr` Impl for `char` fixes #24939. is it possible to use pub(restricted) instead of using a stability attribute for the internal error representation? is it needed at all?
2017-06-20Add a couple doc additional examples for `env::join_paths`.Corey Farwell-0/+29
2017-06-20Add doc example for `CString::from_raw`.Corey Farwell-0/+21
2017-06-20Add doc example for `FromBytesWithNulError`.Corey Farwell-0/+8
2017-06-20Add doc example for `NulError`.Corey Farwell-0/+8
2017-06-20Add doc example for `CStr::to_str`.Corey Farwell-0/+9
2017-06-20Add doc example for `CString::as_c_str`.Corey Farwell-0/+12
2017-06-20Add doc example for `Box<CStr>::into_c_string`.Corey Farwell-0/+12
2017-06-20Add doc example for `CString::into_boxed_c_str`.Corey Farwell-0/+12
2017-06-20Add doc example for `CStr::to_string_lossy`.Corey Farwell-0/+25
2017-06-20Add error scenario doc examples for `CStr::from_bytes_with_nul`.Corey Farwell-0/+18
2017-06-20Add doc example for `CStr::to_bytes_with_nul`.Corey Farwell-0/+9
2017-06-20Add doc example for `CStr::to_bytes`.Corey Farwell-0/+9
2017-06-20Auto merge of #42716 - alexbool:cstr-inlines, r=BurntSushibors-0/+15
Mark smaller CStr and CString functions as #[inline]
2017-06-20added `FromStr` Impl for `char`tinaun-0/+9
2017-06-20Mark smaller CStr and CString functions as #[inline]Alexander Bulaev-0/+15
2017-06-20Auto merge of #42313 - pnkfelix:allocator-integration, r=alexcrichtonbors-0/+20
Allocator integration Lets start getting some feedback on `trait Alloc`. Here is: * the `trait Alloc` itself, * the `struct Layout` and `enum AllocErr` that its API relies on * a `struct HeapAlloc` that exposes the system allocator as an instance of `Alloc` * an integration of `Alloc` with `RawVec` * ~~an integration of `Alloc` with `Vec`~~ TODO * [x] split `fn realloc_in_place` into `grow` and `shrink` variants * [x] add `# Unsafety` and `# Errors` sections to documentation for all relevant methods * [x] remove `Vec` integration with `Allocator` * [x] add `allocate_zeroed` impl to `HeapAllocator` * [x] remove typedefs e.g. `type Size = usize;` * [x] impl `trait Error` for all error types in PR * [x] make `Layout::from_size_align` public * [x] clarify docs of `fn padding_needed_for`. * [x] revise `Layout` constructors to ensure that [size+align combination is valid](https://github.com/rust-lang/rust/pull/42313#issuecomment-306845446) * [x] resolve mismatch re requirements of align on dealloc. See [comment](https://github.com/rust-lang/rust/pull/42313#issuecomment-306202489).
2017-06-19Add compile_error!Wesley Wiser-0/+10
Related to #40872
2017-06-17Reintroduce deprecated `collections` crateMurarth-0/+1
2017-06-16Rollup merge of #42705 - est31:master, r=alexcrichtonCorey Farwell-2/+2
Introduce tidy lint to check for inconsistent tracking issues This PR * Refactors the collect_lib_features function to work in a non-checking mode (no bad pointer needed, and list of lang features). * Introduces checking whether unstable/stable tags for a given feature have inconsistent tracking issues, as in, multiple tracking issues per feature. * Fixes such inconsistencies throughout the codebase.
2017-06-17Auto merge of #42613 - stepancheg:lossy, r=alexcrichtonbors-35/+117
Avoid allocations in Display for OsStr and Path #38879
2017-06-17Auto merge of #42604 - stepancheg:timedwait, r=alexcrichtonbors-19/+81
Fix condvar.wait(distant future) return immediately on OSX Fixes issue #37440: `pthread_cond_timedwait` on macOS Sierra seems to overflow `ts_sec` parameter and returns immediately. To work around this problem patch rounds timeout down to year 3000. Patch also fixes overflow when converting `u64` to `time_t`.
2017-06-16Introduce tidy lint to check for inconsistent tracking issuesest31-2/+2
This commit * Refactors the collect_lib_features function to work in a non-checking mode (no bad pointer needed, and list of lang features). * Introduces checking whether unstable/stable tags for a given feature have inconsistent tracking issues. * Fixes such inconsistencies throughout the codebase.
2017-06-16Auto merge of #42430 - nagisa:core-float, r=alexcrichtonbors-8/+4
Re-implement float min/max in rust This also adds the relevant implementations into libcore. See #42423