summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
2018-01-11Import the CloudABI system call bindings into the libstd tree.Ed Schouten-0/+2898
These automatically generated Rust source files allow us to invoke system calls within CloudABI processes. These will be used by libstd to implement primitives for I/O, threading, etc. These source files are normally part of the 'cloudabi' crate. In the case of libstd, we'd better copy them into the source tree, as having external dependencies in libstd is a bit messy. Original source files can be found here: https://github.com/NuxiNL/cloudabi/tree/master/rust
2018-01-10Fix typo.Alexis Hunt-1/+1
2018-01-10Pre-allocate in fs::read and fs::read_stringMatt Brubeck-2/+10
2018-01-10Auto merge of #46830 - Diggsey:cursor-vec-mut, r=alexcrichtonbors-32/+58
Implement `Write` for `Cursor<&mut Vec<T>>` Fixes #30132 r? @dtolnay (I'm just going through `feature-accepted` issues I swear 😛)
2018-01-10fix typo rwlock.rsBulat Musin-1/+1
Hi. Fixed typo: contained -> content
2018-01-09Rollup merge of #47285 - AndrewBrinker:master, r=kennytmCorey Farwell-1/+1
Fixed a typo in the compile_error docs Noticed a typo and fixed it.
2018-01-10We have Rust 1.25 nowest31-1/+1
2018-01-10Stabilize the panic_col featureest31-2/+1
I've added the panic_col feature in PR #42938. Now it's time to stabilize it! Closes #42939.
2018-01-09Fixes whitespace.Nathaniel Ringo-9/+9
2018-01-09Fixes Duration constructor const fns other than new, reverts new to non-const.Nathaniel Ringo-10/+13
2018-01-09Makes the constructors of Duration const fns.Nathaniel Ringo-5/+5
2018-01-09Make core::ops::Place an unsafe traitTaylor Cramer-1/+1
2018-01-09remove implementation detail from docTrevor Spiteri-4/+4
2018-01-08Fixed a typo in the compile_error docsAndrew Brinker-1/+1
2018-01-09Rollup merge of #47272 - GuillaumeGomez:missing-links, r=QuietMisdreavuskennytm-7/+14
Add missing links r? @QuietMisdreavus (please wait for CI, I have a few doubts about the `Write` trait links...)
2018-01-09Rollup merge of #47259 - sfackler:map-remove-entry, r=dtolnaykennytm-1/+49
Add HashMap::remove_entry Implements #46344 r? @dtolnay
2018-01-09Rollup merge of #47254 - rkruppe:no-more-align-hack, r=alexcrichtonkennytm-12/+3
Replace empty array hack with repr(align) As a side effect, this fixes the warning about repr(C, simd) that has been reported during x86_64 windows builds since #47111 (see also: #47103) r? @alexcrichton
2018-01-08doc: show that `f32::log` and `f64::log` are not correctly roundedTrevor Spiteri-20/+18
2018-01-08Add missing linksGuillaume Gomez-7/+14
2018-01-07Add HashMap::remove_entrySteven Fackler-1/+49
Implements #46344
2018-01-07Replace empty array hack with repr(align)Robin Kruppe-12/+3
As a side effect, this fixes the warning about repr(C, simd) that has been reported during x86_64 windows builds since #47111 (see also: #47103)
2018-01-07Make wasm obey backtrace feature, like other targetsAidan Hobson Sayers-0/+1
2018-01-06type error method suggestions use whitelisted identity-like conversionsZack M. Davis-1/+2
Previously, on a type mismatch (and if this wasn't preëmpted by a higher-priority suggestion), we would look for argumentless methods returning the expected type, and list them in a `help` note. This had two major shortcomings. Firstly, a lot of the suggestions didn't really make sense (if you used a &str where a String was expected, `.to_ascii_uppercase()` is probably not the solution you were hoping for). Secondly, we weren't generating suggestions from the most useful traits! We address the first problem with an internal `#[rustc_conversion_suggestion]` attribute meant to mark methods that keep the "same value" in the relevant sense, just converting the type. We address the second problem by making `FnCtxt.probe_for_return_type` pass the `ProbeScope::AllTraits` to `probe_op`: this would seem to be safe because grep reveals no other callers of `probe_for_return_type`. Also, structured suggestions are preferred (because they're pretty, but also for RLS and friends). Also also, we make the E0055 autoderef recursion limit error use the one-time-diagnostics set, because we can potentially hit the limit a lot during probing. (Without this, test/ui/did_you_mean/recursion_limit_deref.rs would report "aborting due to 51 errors"). Unfortunately, the trait probing is still not all one would hope for: at a minimum, we don't know how to rule out `into()` in cases where it wouldn't actually work, and we don't know how to rule in `.to_owned()` where it would. Issues #46459 and #46460 have been filed and are ref'd in a FIXME. This is hoped to resolve #42929, #44672, and #45777.
2018-01-07Rollup merge of #47217 - stjepang:set-examples, r=frewsxcvkennytm-0/+33
Write examples for {BTree,Hash}Set::{get,replace,take}
2018-01-06Auto merge of #47141 - alexcrichton:bump-bootstrap, r=alexcrichtonbors-48/+3
Bump to 1.25.0 * Bump the release version to 1.25 * Bump the bootstrap compiler to the recent beta * Allow using unstable rustdoc features on beta - this fix has been applied to the beta branch but needed to go to the master branch as well.
2018-01-06Rollup merge of #47216 - SergioBenitez:doc-fix, r=Mark-SimulacrumGuillaume Gomez-1/+1
Clarify appending behavior of 'io::Read::read_to_string()'. A simple doc clarification.
2018-01-06Rollup merge of #47165 - mbrubeck:args, r=alexcrichtonGuillaume Gomez-23/+16
[unix] Don't clone command-line args on startup Fixes part of #47164 and simplifies the `args` code on non-Apple Unix platforms. Note: This could change behavior for programs that use both `std::env::args` *and* unsafe code that mutates `argv` directly. However, these programs already behave differently on different platforms. The new behavior on non-Apple platforms is closer to the existing behavior on Apple platforms.
2018-01-06Rollup merge of #46987 - frewsxcv:frewsxcv-current-exe, r=QuietMisdreavusGuillaume Gomez-8/+11
Minor rewrite of env::current_exe docs; clarify symlinks. - 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.
2018-01-05Write examples for {BTree,Hash}Set::{get,replace,take}Stjepan Glavina-0/+33
2018-01-05Clarify appending behavior of 'io::Read::read_to_string()'.Sergio Benitez-1/+1
2018-01-05Rollup merge of #47198 - dzamlo:patch-2, r=frewsxcvkennytm-2/+2
Fix an error in std::process documentation
2018-01-05Rollup merge of #47030 - ollie27:stab, r=alexcrichtonkennytm-14/+14
Correct a few stability attributes * The extra impls for `ManuallyDrop` were added in #44310 which was only stabilised in 1.22.0. * The impls for `SliceIndex` were stabilised in #43373 but as `RangeInclusive` and `RangeToInclusive` are still unstable the impls should remain unstable. * The `From` impls for atomic integers were added in #45610 but most atomic integers are still unstable. * The `shared_from_slice2` impls were added in #45990 but they won't be stable until 1.24.0. * The `Mutex` and `RwLock` impls were added in #46082 but won't be stable until 1.24.0.
2018-01-04[unix] Don't clone command-line args on startupMatt Brubeck-23/+16
2018-01-04Fix an error in std::process documentationLoïc Damien-2/+2
2018-01-04Bump to 1.25.0Alex Crichton-48/+3
* Bump the release version to 1.25 * Bump the bootstrap compiler to the recent beta * Allow using unstable rustdoc features on beta - this fix has been applied to the beta branch but needed to go to the master branch as well.
2018-01-02Document when LineWriter flushes; document errors for into_inner.Corey Farwell-0/+11
Fixes https://github.com/rust-lang/rust/issues/42468.
2018-01-02Auto merge of #47042 - redox-os:redox, r=estebankbors-7/+34
Redox - Implement rename using new system call This does the following: - Update syscall module to match upstream - Implement rename using new system call - Make readlink and symlink utilize O_CLOEXEC - Make readlink and symlink not leave dangling file handles on failure
2017-12-31Auto merge of #46713 - Manishearth:memchr, r=blussbors-232/+5
Use memchr to speed up [u8]::contains 3x None
2017-12-30Fix doc typo for is_ascii_graphicvarkor-1/+1
Fixes #47067.
2017-12-29Auto merge of #47026 - EdSchouten:cloudabi-unwind, r=kennytmbors-1/+8
Link against -lunwind on CloudABI. CloudABI makes use of LLVM's libunwind to do stack unwinding. It is installed under the name libunwind.a.
2017-12-29Add proper library dependencies for libstd on CloudABI.Ed Schouten-1/+8
Don't attempt to build libunwind on CloudABI, as libunwind is already provided by the system by default.
2017-12-28Remove an unused import for cfg(not(feature = "backtrace")).Ed Schouten-2/+0
The 'mem' module is not used for this specific code. This was copy-pasted in by accident when adding RFC 1937 (? in main) support.
2017-12-28Implement AsRef<Path> for ComponentDiggory Blake-0/+7
2017-12-27Implement rename using new system callJeremy Soller-7/+34
Fix readlink and symlink to utilize O_CLOEXEC
2017-12-27Auto merge of #46479 - bkchr:termination_trait, r=arielb1bors-2/+144
Implements RFC 1937: `?` in `main` This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function. Thanks @nikomatsakis, @arielb1 and all other people in the gitter channel for all your help! The support for doctest and `#[test]` is still missing, bu as @nikomatsakis said, smaller pull requests are better :)
2017-12-27Correct a few stability attributesOliver Middleton-14/+14
2017-12-27Auto merge of #46977 - est31:column_fix, r=dtolnaybors-6/+12
Make the output of the column! macro 1 based Fixes #46868. I didn't add any regression tests as the change already had to change tests inside the codebase. r? @dtolnay
2017-12-26Don't use `process::exit` as it is an `unreachable` on wasm32Bastian Köcher-6/+5
2017-12-26Auto merge of #46554 - ↵bors-6/+3
kennytm:45861-step-4-5-6-7-upload-test-result-and-remove-toolstate-toml, r=alexcrichton [auto-toolstate] Upload the toolstate result to an external git repository, and removes BuildExpectation This PR consists of 3 commits. 1. (Steps 4–6) The `toolstate.json` output previously collected is now pushed to the https://github.com/rust-lang-nursery/rust-toolstate repository. 2. (Step 7) Revert commit ab018c7, thus removing all traces of `BuildExpectation` and `toolstate.toml`. 3. (Step 8) Adjust CONTRIBUTION.md for the new procedure. These are the last steps of #45861. After this PR, the toolstate will be automatically computed and published to https://rust-lang-nursery.github.io/rust-toolstate/. There is no need to manage toolstate.toml again. Closes #45861.
2017-12-27Revert "Add a file to trivially disable tool building or testing"kennytm-6/+3
This reverts commit ab018c76e14b87f3c9e0b7384cc9b02d94779cd5. This also adds the `ToolBuild::is_ext_tool` field to replace the previous `ToolBuild::expectation` field, to indicate whether a build-failure of certain tool is essential.