summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-06-17Auto merge of #51529 - nodakai:improve-sys_common-mutex, r=oli-obkbors-69/+73
libstd: add an RAII utility for sys_common::mutex::Mutex It is indeed debatable whether or not we should introduce more sophistication like this to the lowest layer of a system library. In fact, `Drop::drop()` cannot be `unsafe` (IIRC there was a discussion on introducing an unsafe variant of `Drop` whose entire scope must be within `unsafe`)
2018-06-17Auto merge of #51555 - ccesare:remove_unused_variables_redox_os, r=kennytmbors-3/+0
Removed two unused variables in os.rs Issue #51419 suggested removing two unused variables in `libstd/sys/redox/os.rs`. This PR implements that change. It compiles for me locally, but I haven't run any other tests.
2018-06-17libstd: add an RAII utility for sys_common::mutex::MutexNODA, Kai-69/+73
Signed-off-by: NODA, Kai <nodakai@gmail.com>
2018-06-17Auto merge of #51382 - GuillaumeGomez:intra-link-lint, r=QuietMisdreavusbors-0/+2
Add lint for intra link resolution failure This PR is almost done, just remains this note: ``` note: requested on the command line with `-W intra-link-resolution-failure` ``` I have no idea why my lint is considered as being passed through command line and wasn't able to find where it was set. If anyone has an idea, it'd be very helpful! cc @QuietMisdreavus
2018-06-15Add doc for fn keywordGuillaume Gomez-0/+33
2018-06-15Fix issue on unixGuillaume Gomez-0/+1
2018-06-14Removed two unused variablesChris Cesare-3/+0
2018-06-13Add missing allow_missing_docsGuillaume Gomez-0/+1
2018-06-12Fix possibly endless loop in ReadDir iteratorsharkdp-7/+24
Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream. This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`. fixes #50619
2018-06-12Auto merge of #51241 - glandium:globalalloc, r=sfackler,SimonSapinbors-23/+84
Stabilize GlobalAlloc and #[global_allocator] This PR implements the changes discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-393263510 Fixes #49668 Fixes #27389 This does not change the default global allocator: #36963
2018-06-11Move Unstable Book sections for #[global_allocator] and System to std::alloc ↵Simon Sapin-0/+62
docs
2018-06-11Remove some '#[feature]' attributes for stabilized featuresSimon Sapin-1/+0
2018-06-11Stabilize the `System` allocatorSimon Sapin-1/+1
2018-06-11Move set_oom_hook and take_oom_hook to a dedicated tracking issueSimon Sapin-2/+2
2018-06-11Mark as permanently-unstable some implementation detailsSimon Sapin-2/+2
2018-06-11Stablize the alloc module without changing stability of its contents.Simon Sapin-6/+13
2018-06-11Document memory allocation APIsSimon Sapin-1/+1
Add some docs where they were missing, attempt to fix them where they were out of date.
2018-06-11Remove the deprecated Heap type/constSimon Sapin-1/+0
2018-06-11Remove deprecated heap modulesSimon Sapin-9/+2
The heap.rs file was already unused.
2018-06-11Replace `impl GlobalAlloc for Global` with a set of free functionsMike Hommey-0/+1
2018-06-11Remove alloc::Opaque and use *mut u8 as pointer type for GlobalAllocMike Hommey-6/+6
2018-06-11Auto merge of #51442 - tinaun:more-future-impls, r=cramertjbors-0/+19
[futures] add a few blanket impls to std these were defined in the futures crate, but with the core definitions moving to std these would need to move too.
2018-06-11Add #[doc(inline)] in std::taskCrLF0710-0/+2
Add #[doc(inline)] in `std::task` to make the doc seem right.
2018-06-10Stabilize entry-or-defaultGuillaume Gomez-3/+1
2018-06-09add inherent methods to Polltinaun-1/+1
2018-06-09Auto merge of #51359 - cramertj:fdio_spawn, r=sfacklerbors-110/+51
[fuchsia] Migrate from launchpad to fdio_spawn_etc fdio_spawn_etc is the preferred way of creating processes on Fuchsia now. cc @abarth
2018-06-08addressed nitstinaun-3/+3
2018-06-08add a few blanket future impls to stdtinaun-0/+19
2018-06-07[fuchsia] Migrate from launchpad to fdio_spawn_etcAdam Barth-110/+51
fdio_spawn_etc is the preferred way of creating processes on Fuchsia now.
2018-06-06Auto merge of #51263 - cramertj:futures-in-core, r=aturonbors-0/+16
Add Future and task system to the standard library This adds preliminary versions of the `std::future` and `std::task` modules in order to unblock development of async/await (https://github.com/rust-lang/rust/issues/50547). These shouldn't be considered as final forms of these libraries-- design questions about the libraries should be left on https://github.com/rust-lang/rfcs/pull/2418. Once that RFC (or a successor) is merged, these APIs will be adjusted as necessary. r? @aturon
2018-06-06Add Future and task system to the standard libraryTaylor Cramer-0/+16
2018-06-06Revert "Remove TryFrom impls that might become conditionally-infallible with ↵Simon Sapin-18/+2
a portability lint" This reverts commit 837d6c70233715a0ae8e15c703d40e3046a2f36a. Fixes https://github.com/rust-lang/rust/issues/49415
2018-06-05Rollup merge of #51255 - avdv:patch-1, r=kennytmMark Simulacrum-2/+2
Fix confusing error message for sub_instant When subtracting an Instant from another, the function will panick when `RHS > self`, but the error message confusingly displays a different error: ```rust let i = Instant::now(); let other = Instant::now(); if other > i { println!("{:?}", i - other); } ``` This results in a panic: ``` thread 'test_instant' panicked at 'other was less than the current instant', libstd/sys/unix/time.rs:292:17 ``` But clearly, `other` was actually greater than the current instant.
2018-06-05Auto merge of #51140 - GuillaumeGomez:doc-keyword, r=QuietMisdreavusbors-0/+1
rustdoc: introduce the #[doc(keyword="")] attribute for documenting keywords Part of #34601. r? @QuietMisdreavus
2018-06-04Optimize layout calculations in HashMapAmanieu d'Antras-3/+16
This now produces the same assembly code as the previous implementation.
2018-06-04Put doc keyword behind feature flagGuillaume Gomez-0/+1
2018-06-04Clarify error phrase in `sub_instant` functionClaudio Bley-2/+2
Uses the same wording as [`src/libstd/sys/windows/time.rs`][1]. 1: https://github.com/avdv/rust/blob/95e2bf253d864c5e14ad000ffa2040ce85916056/src/libstd/sys/windows/time.rs#L65
2018-06-03remove #[unwind(allowed)]Jorge Aparicio-1/+0
not required because this is a Rust function
2018-06-03undo payload in core::panic! changesJorge Aparicio-79/+30
2018-06-03format payload if possible instead of returning "Box<Any>"Jorge Aparicio-4/+11
2018-06-03implement #[panic_implementation]Jorge Aparicio-3/+96
2018-06-02Add a couple lines describing differences between into_mut/get_mut.Corey Farwell-0/+9
2018-06-02Fixed typoPhlosioneer-1/+1
2018-06-02Clarify the difference between get_mut and into_mut for OccupiedEntryPhlosioneer-2/+6
The examples for both hash_map::OccupiedEntry::get_mut and hash_map::OccupiedEntry::into_mut were almost identical. This led to some confusion over the difference, namely why you would ever use get_mut when into_mut gives alonger lifetime. Reddit thread: https://www.reddit.com/r/rust/comments/8a5swr/why_does_hashmaps This commit adds two lines and a comment to the example, to show that the entry object can be re-used after calling get_mut.
2018-06-02removes tabsPslydhh-8/+6
2018-06-02remove trailing whitespacePslydhh-6/+6
remove trailing whitespace
2018-06-02park():prohibit spurious wakeups in next parkPslydhh-2/+10
should consume this notification, so prohibit spurious wakeups in next park
2018-06-02Auto merge of #51270 - nicokoch:issue-51266, r=TimNNbors-5/+12
fs: copy: Add EPERM to fallback error conditions Fixes #51266
2018-06-01Rollup merge of #51272 - steveklabnik:remove_feature_flag, r=QuietMisdreavusMark Simulacrum-2/+0
Remove feature flag from fs::read_to_string example This is stable, and so no longer needed
2018-06-01Simplify HashMap layout calculation by using LayoutAmanieu d'Antras-107/+13