about summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-06-15Add doc for fn keywordGuillaume Gomez-0/+33
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-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-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
2018-06-01Auto merge of #51264 - glandium:oom, r=alexcrichtonbors-10/+12
Make the OOM hook return `()` rather than `!` Per discussion in https://github.com/rust-lang/rust/issues/51245#issuecomment-393651083 This allows more flexibility in what can be done with the API. This also splits `rtabort!` into `dumb_print` happening in the default hook and `abort_internal`, happening in the actual oom handler after calling the hook. Registering an empty function thus makes the oom handler not print anything but still abort. Cc: @alexcrichton
2018-06-01Remove feature flag from fs::read_to_string examplesteveklabnik-2/+0
This is stable, and so no longer needed
2018-06-01fs: copy: Add EPERM to fallback error conditionsNicolas Koch-5/+12
Fixes #51266
2018-06-01Make the OOM hook return `()` rather than `!`Mike Hommey-10/+12
Per discussion in https://github.com/rust-lang/rust/issues/51245#issuecomment-393651083 This allows more flexibility in what can be done with the API. This also splits `rtabort!` into `dumb_print` happening in the default hook and `abort_internal`, happening in the actual oom handler after calling the hook. Registering an empty function thus makes the oom handler not print anything but still abort. Cc: @alexcrichton
2018-05-31Rollup merge of #51213 - nicokoch:copy_permissions, r=cramertjGuillaume Gomez-5/+5
fs: copy: Use File::set_permissions instead of fs::set_permissions We already got the open file descriptor at this point. Don't make the kernel resolve the path again.
2018-05-31Fix confusing error message for sub_instantClaudio Bley-1/+1
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 ```
2018-05-31libstd/sys/unix/fs.rs: fix compilation on fuchsiaGuillaume Girol-1/+1
2018-05-30std::fs::DirEntry.metadata(): use fstatat instead of lstat when possibleGuillaume Girol-11/+32
2018-05-30Auto merge of #50955 - steveklabnik:update-libbacktrace, r=alexcrichtonbors-23/+53
Update libbacktrace We haven't updated libbacktrace in two years. This is just blindly updating to the latest HEAD; I'd like to see what travis says. It at least builds on my machine, running some tests... This perpetuates the patches from https://github.com/rust-lang/rust/pull/30908
2018-05-30Replace libbacktrace with a submoduleAlex Crichton-23/+53
While we're at it update the `backtrace` crate from crates.io. It turns out that the submodule's configure script has gotten a lot more finnicky as of late so also switch over to using the `cc` crate manually which allows to avoid some hacks around the configure script as well
2018-05-30Auto merge of #50880 - glandium:oom, r=SimonSapinbors-24/+108
OOM handling changes As discussed in https://github.com/rust-lang/rust/issues/49668#issuecomment-384893456 and subsequent. This does have codegen implications. Even without the hooks, and with a handler that ignores the arguments, the compiler doesn't eliminate calling `rust_oom` with the `Layout`. Even if it managed to eliminate that, with the hooks, I don't know if the compiler would be able to figure out it can skip it if the hook is never set. A couple implementation notes: - I went with explicit enums rather than bools because it makes it clearer in callers what is being requested. - I didn't know what `feature` to put the hook setting functions behind. (and surprisingly, the compile went through without any annotation on the functions) - There's probably some bikeshedding to do on the naming. Cc: @Simonsapin, @sfackler
2018-05-30Remobve unused importNicolas Koch-1/+1