summary refs log tree commit diff
path: root/src/libstd
AgeCommit message (Collapse)AuthorLines
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.
2017-12-26Change name of `lang_start_real` to `lang_start_internal`Bastian Köcher-5/+4
Also remove `'static` from `__rust_begin_short_backtrace`
2017-12-26Split `lang_start` in two functions to reduce generated codeBastian Köcher-5/+14
2017-12-26Rework the exit failure and success declaration for wasm32Bastian Köcher-4/+14
2017-12-26Use move for optimization purposesBastian Köcher-1/+1
2017-12-26Don't emit the termination lang item in testsBastian Köcher-1/+1
2017-12-26Removes some obscure transmute call in `lang_start`Bastian Köcher-1/+1
2017-12-26Adds termination_trait feature gateBastian Köcher-8/+8
2017-12-26Fixes compilation errors and adds proposed improvementsBastian Köcher-0/+2
2017-12-26Implements RFC 1937: `?` in `main`Bastian Köcher-1/+124
This is the first part of the RFC 1937 that supports new `Termination` trait in the rust `main` function.
2017-12-26Rollup merge of #46943 - malbarbo:process-test-busybox, r=alexcrichtonkennytm-1/+1
Fix process test when using busybox mkdir busybox mkdir . returns 0 busybox mkdir ./ returns 1
2017-12-26Rollup merge of #46933 - clarcharr:float_docs, r=steveklabnikkennytm-2/+2
Make core::f32/f64 docs match std. For some reason these weren't in sync.
2017-12-25Fix docs mistakeest31-1/+1
2017-12-25Auto merge of #46914 - mikeyhew:raw_pointer_self, r=arielb1bors-3/+3
Convert warning about `*const _` to a future-compat lint #46664 was merged before I could convert the soft warning about method lookup on `*const _` into a future-compatibility lint. This PR makes that change. fixes #46837 tracking issue for the future-compatibility lint: #46906 r? @arielb1
2017-12-24Auto merge of #46789 - Diggsey:command-env-capture, r=dtolnaybors-167/+321
Capture `Command` environment at spawn Fixes #28975 This tracks a set of changes to the environment and then replays them at spawn time.
2017-12-24Minor rewrite of env::current_exe docs; clarify symlinks.Corey Farwell-8/+11
- 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.
2017-12-24Capture environment at spawnDiggory Blake-167/+321
2017-12-24Make column macro output 1 based and document itest31-6/+12
2017-12-23Annotate raw pointer target typesChristopher Durham-1/+1
cc https://github.com/rust-lang/rust/issues/46906 cc https://github.com/rust-lang/rust/pull/46914
2017-12-22Expose float from_bits and to_bits in libcore.Clar Charr-6/+4
2017-12-22fix some errors in libstdMichael Hewson-2/+2
2017-12-22Fix process test when using busybox mkdirMarco A L Barbosa-1/+1
busybox mkdir . returns 0 busybox mkdir ./ returns 1