about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2019-12-17Revert "Auto merge of #67362 - Mark-Simulacrum:par-4-default, r=alexcrichton"Mark Rousskov-36/+50
This reverts commit 3ed3b8bb7b100afecf7d5f52eafbb70fec27f537, reversing changes made to 99b89533d4cdf7682ea4054ad0ee36c351d05df1. We will reland a similar patch at a future date but for now we should get a nightly released in a few hours with the parallel patch, so this should be reverted to make sure that the next nightly is not parallel-enabled.
2019-12-17Auto merge of #67362 - Mark-Simulacrum:par-4-default, r=alexcrichtonbors-50/+36
4 thread parallelism by default The Session default here is super unusual but seems to both compile and do what we expect as best as I can tell.
2019-12-17Disable cargo tests for nowMark Rousskov-13/+13
These depend on rustc being bug-free and it looks like that's not currently entirely the case (e.g., we know of at least one bug that introduces nondeterminism).
2019-12-17Move AtomicU64 usage to AtomicUsizeMark Rousskov-11/+14
2019-12-16Always build and ship parallel-enabled compilersMark Rousskov-21/+4
This also removes the unused NO_PARALLEL_COMPILER flag; if we want that functionality we can readd it but this makes sure we really are parallel everywhere. This also patches a test that has differing output in the parallel case (hopefully deterministically so!).
2019-12-16Change the default thread count to min(4, vCPUs)Mark Rousskov-5/+5
This avoids the problems of high thread counts (i.e., contention in the kernel on the jobserver pipe due to thundering herd of readers) while stil giving rustc some parallelism to work with.
2019-12-16Rollup merge of #67349 - petertodd:2019-unsize-docs, r=CentrilMazdak Farrokhzad-1/+1
Minor: update Unsize docs for dyn syntax
2019-12-16Rollup merge of #67336 - GuillaumeGomez:fix-js-error, r=Dylan-DPCMazdak Farrokhzad-1/+1
Fix JS error when loading page with search For example when you load this page: https://doc.rust-lang.org/nightly/std/num/struct.NonZeroI8.html?search=foo, you get a nice JS error: ``` TypeError: ev is undefined ``` r? @kinnison
2019-12-16Rollup merge of #67323 - Centril:tes, r=davidtwcoMazdak Farrokhzad-18/+17
make transparent enums more ordinary By recognizing that structs & unions have one variant, we can make the treatment of transparent enums less ad-hoc. cc https://github.com/rust-lang/rust/issues/60405 r? @davidtwco
2019-12-16Rollup merge of #67322 - lzutao:nonzero-use-self, r=joshtriplettMazdak Farrokhzad-3/+3
use Self alias in place of macros
2019-12-16Rollup merge of #67318 - Centril:spdocs, r=matthewjasperMazdak Farrokhzad-17/+63
Improve typeck & lowering docs for slice patterns cc #62254 r? @matthewjasper
2019-12-16Rollup merge of #67308 - dtolnay:fast_rebind, r=alexcrichtonMazdak Farrokhzad-15/+0
Delete flaky test net::tcp::tests::fast_rebind This test is unreliable for at least 3 users on two platforms: see #57509 and #51006. It was added 5 years ago in #22015. Do we know whether this is testing something important that would indicate a bug in our implementation, or if it's fine to remove? r? @sfackler @alexcrichton because this somewhat resembles #59018 Closes #57509. Closes #51006.
2019-12-16Rollup merge of #67249 - ranma42:improve-starts-with-literal-char, r=BurntSushiMazdak Farrokhzad-15/+48
Improve code generated for `starts_with(<literal char>)` This PR includes two minor improvements to the code generated when checking for string prefix/suffix. The first commit simplifies the str/str operation, by taking advantage of the raw UTF-8 representation. The second commit replaces the current str/char matching logic with a char->str encoding and then the previous method. The resulting code should be equivalent in the generic case (one char is being encoded versus one char being decoded), but it becomes easy to optimize in the case of a literal char, which in most cases a developer might expect to be at least as simple as that of a literal string. This PR should fix #41993
2019-12-16Add benchmarks for `start_with` and `ends_with`Andrea Canciani-0/+44
2019-12-16Minor: update Unsize docs for dyn syntaxPeter Todd-1/+1
2019-12-16improve lower_pat_slice docs + while -> forMazdak Farrokhzad-12/+26
2019-12-16Rollup merge of #67325 - Centril:push-fake-read, r=matthewjasperMazdak Farrokhzad-48/+23
cleanup with push_fake_read ...and make things a bit more readable. r? @matthewjasper
2019-12-16Rollup merge of #67324 - Centril:mir-build-match-doc-fix, r=matthewjasperMazdak Farrokhzad-2/+1
Fix repetition in matches/mod.rs r? @matthewjasper
2019-12-16Rollup merge of #67317 - lcnr:type_name_docs, r=jonas-schievinkMazdak Farrokhzad-1/+1
fix type_name_of_val doc comment .
2019-12-16Rollup merge of #66771 - SimonSapin:panic-stability, r=KodrAusMazdak Farrokhzad-8/+10
Stabilize the `core::panic` module `std::panic` is already stable. `core::panic::PanicInfo` and `core::panic::Location` are stable and can be used through that path because of a bug in stability checking: #15702
2019-12-16Rollup merge of #66735 - SOF3:feature/str_strip, r=KodrAusMazdak Farrokhzad-1/+72
Add str::strip_prefix and str::strip_suffix Introduces a counterpart for `Path::strip_prefix` on `str`. This was also discussed in https://internals.rust-lang.org/t/pre-pr-path-strip-prefix-counterpart-in-str/11364/.
2019-12-16Rollup merge of #66570 - lzutao:stabilize-result-map_or, r=Dylan-DPCMazdak Farrokhzad-5/+4
stabilize Result::map_or r? @SimonSapin Closes #66293
2019-12-16Rollup merge of #65778 - bdonlan:stable_weak_count, r=dtolnayMazdak Farrokhzad-49/+35
Stabilize `std::{rc,sync}::Weak::{weak_count, strong_count}` * Original PR: #56696 * Tracking issue: #57977 Closes: #57977 Supporting comments: > Although these were added for testing, it is occasionally useful to have a way to probe optimistically for whether a weak pointer has become dangling, without actually taking the overhead of manipulating atomics. Are there any plans to stabilize this? _Originally posted by @bdonlan in https://github.com/rust-lang/rust/issues/57977#issuecomment-516970921_ > Having this stabilized would help. Currently, the only way to check if a weak pointer has become dangling is to call `upgrade`, which is by far expensive. _Originally posted by @glebpom in https://github.com/rust-lang/rust/issues/57977#issuecomment-526934709_ Not sure if stabilizing these warrants a full RFC, so throwing this out here as a start for now. Note: per CONTRIBUTING.md, I ran the tidy checks, but they seem to be failing on unchanged files (primarily in `src/stdsimd`).
2019-12-15Fix JS error when loading page with searchGuillaume Gomez-1/+1
2019-12-15cleanup with push_fake_readMazdak Farrokhzad-48/+23
2019-12-15Fix repetition in matches/mod.rsMazdak Farrokhzad-2/+1
2019-12-15make transparent enums more ordinaryMazdak Farrokhzad-18/+17
2019-12-15use Self alias in place of macrosLzu Tao-3/+3
2019-12-15improve hir::PatKind::Slice docsMazdak Farrokhzad-2/+9
2019-12-15document check_pat_sliceMazdak Farrokhzad-0/+25
2019-12-15comment -> doc commentMazdak Farrokhzad-3/+3
2019-12-15fix doc commentlcnr/Bastian Kauschke-1/+1
2019-12-15Set tracking issue for str_stripSOFe-2/+2
2019-12-15Rollup merge of #67305 - kappa:patch-1, r=jonas-schievinkMazdak Farrokhzad-1/+1
Doc typo
2019-12-15Rollup merge of #67300 - aloucks:issue-65970, r=rkruppeMazdak Farrokhzad-1/+16
Restore original implementation of Vec::retain This PR reverts #48065, which aimed to optimize `Vec::retain` by making use of `Vec::drain_filter`. Unfortunately at that time, `drain_filter` was unsound. The soundness hole in `Vec::drain_filter` was fixed in #61224 by guaranteeing that cleanup logic runs via a nested `Drop`, even in the event of a panic. Implementing this nested drop affects codegen (apparently?) and results in slower code. Fixes #65970
2019-12-15Rollup merge of #67289 - estebank:unnamed-closure, r=CentrilMazdak Farrokhzad-4/+57
Do not ICE on unnamed future Fix #67252.
2019-12-15Rollup merge of #67282 - pjw91:patch-1, r=Dylan-DPCMazdak Farrokhzad-1/+1
Fix example code of OpenOptions::open The example didn't set the access mode flag, which resulted in an `Err(InvalidInput)`. r? @steveklabnik
2019-12-15Rollup merge of #67267 - alexcrichton:update-wasi-libc, r=Dylan-DPCMazdak Farrokhzad-14/+21
Fix signature of `__wasilibc_find_relpath` Looks like this function changed upstream, so it needs to be adjusted for when used by libstd.
2019-12-15Rollup merge of #67255 - tuxillo:remove-i686-unknown-dragonfly, r=alexcrichtonMazdak Farrokhzad-24/+0
Remove i686-unknown-dragonfly target DragonFly BSD removed support for i386 a while ago. It only supports x86_64 right now.
2019-12-14Bump Weak::strong_count/weak_count stabilizations from 1.40 to 1.41David Tolnay-4/+4
2019-12-14Delete flaky test net::tcp::tests::fast_rebindDavid Tolnay-15/+0
2019-12-15Auto merge of #67216 - ecstatic-morse:const-loop, r=oli-obkbors-127/+559
Enable `loop` and `while` in constants behind a feature flag This PR is an initial implementation of #52000. It adds a `const_loop` feature gate, which allows `while` and `loop` expressions through both HIR and MIR const-checkers if enabled. `for` expressions remain forbidden by the HIR const-checker, since they desugar to a call to `IntoIterator::into_iter`, which will be rejected anyways. `while` loops also require [`#![feature(const_if_match)]`](https://github.com/rust-lang/rust/pull/66507), since they have a conditional built into them. The diagnostics from the HIR const checker will suggest this to the user. r? @oli-obk cc @rust-lang/wg-const-eval
2019-12-14Doc typoAlex Kapranoff-1/+1
2019-12-14Do not ICE on unnamed futureEsteban Küber-4/+57
2019-12-14Auto merge of #67224 - nikomatsakis:revert-stabilization-of-never-type, ↵bors-170/+454
r=centril Revert stabilization of never type Fixes https://github.com/rust-lang/rust/issues/66757 I decided to keep the separate `never-type-fallback` feature gate, but tried to otherwise revert https://github.com/rust-lang/rust/pull/65355. Seemed pretty clean. ( cc @Centril, author of #65355, you may want to check this over briefly )
2019-12-14update referenceNiko Matsakis-0/+0
2019-12-14update clippy to the rustc-pr-67224 branchNiko Matsakis-13/+5
Actually to commit <69f99e74ac2266dff4b5adc7c59b35236f0abef1>.
2019-12-14Restore original implementation of Vec::retainAaron Loucks-1/+16
This PR reverts #48065, which aimed to optimize `Vec::retain` by making use of `Vec::drain_filter`. Unfortunately at that time, `drain_filter` was unsound. The soundness hole in `Vec::drain_filter` was fixed in #61224 by guaranteeing that cleanup logic runs via a nested `Drop`, even in the event of a panic. Implementing this nested drop affects codegen (apparently?) and results in slower code. Fixes #65970
2019-12-14[WIP] fix tests after rebaseNiko Matsakis-47/+15
2019-12-14add `#![feature(never_type)]` to tests as neededNiko Matsakis-11/+16