Commit Graph

92258 Commits

Author SHA1 Message Date
Ralf Jung
8b09d046fe fix LinkedList invalidating mutable references 2019-04-19 18:33:08 +02:00
bors
be1dbaffed Auto merge of #60048 - estebank:issue-54954, r=sanxiyn
Fix ICE on const evaluation of const method

Fix #54954.
2019-04-18 06:00:06 +00:00
bors
fb1b222f04 Auto merge of #60051 - estebank:fn-sugg, r=davidtwco
Do not mention missing `PartialOrd` impl when involving uncalled fns
2019-04-18 03:06:17 +00:00
Esteban Küber
84af684b48 review comment: add extra doc 2019-04-17 16:42:52 -07:00
bors
9387927ae2 Auto merge of #60054 - Centril:rollup-o40xxaa, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #59908 (Re-export core::str::{EscapeDebug, EscapeDefault, EscapeUnicode} in std)
 - #59984 (Remove collection-specific `with_capacity` documentation from `std::collections`)
 - #60036 (Remove nrc from toolstate pings)
 - #60037 (Resolve inconsistency in error messages between "parameter" and "variable".)

Failed merges:

r? @ghost
2019-04-17 22:24:11 +00:00
Mazdak Farrokhzad
42b3cf107d
Rollup merge of #60037 - eddyb:actually-its-param, r=estebank
Resolve inconsistency in error messages between "parameter" and "variable".

The inconsistency was introduced in 104fe1c4db (#33619), when a label saying `type variable` was added to an error with a message talking about `type parameters`.
Given that `parameter` is far more prevalent when referring to generics in the context of Rust, IMO it should be that in both the message and the label.

r? @nikomatsakis or @estebank
2019-04-18 00:23:40 +02:00
Mazdak Farrokhzad
4664a50089
Rollup merge of #60036 - rust-lang:nrc-patch-1, r=Xanewok
Remove nrc from toolstate pings

🙉
2019-04-18 00:23:39 +02:00
Mazdak Farrokhzad
43985d965a
Rollup merge of #59984 - gluyas:collections-with_capacity-doc-fix, r=rkruppe
Remove collection-specific `with_capacity` documentation from `std::collections`

Fixes #59931

The style of `std::collections` module doc is very much a beginner friendly guide, and documenting niche, collection-specific behaviour feels out of place, if not brittle.

The note about `VecDeque` is outdated (see issue), and while `Vec` probably won't change its guarantees any time soon, the users who are interested in its allocation properties will find that in its own documentation.
2019-04-18 00:23:38 +02:00
Mazdak Farrokhzad
a20438773b
Rollup merge of #59908 - lzutao:str_escape, r=SimonSapin
Re-export core::str::{EscapeDebug, EscapeDefault, EscapeUnicode} in std

cc #59893
2019-04-18 00:23:36 +02:00
Esteban Küber
8f77a035a4 Do not mention missing PartialOrd impl when involving uncalled fns 2019-04-17 14:37:52 -07:00
bors
3c3d3c1777 Auto merge of #59527 - matklad:sized-index, r=Centril
Add test checking that Index<T: ?Sized> works

I've noticed that we have an `Idx: ?Sized` bound on the **index** in the `Index`, which seems strange given that we accept index by value. My guess is that it was meant to be removed in https://github.com/rust-lang/rust/pull/23601, but was overlooked.

If I remove this bound, `./x.py src/libstd/ src/libcore/` passes, which means at least that this is not covered by test.

I think there's three things we can do here:

* run crater with the bound removed to check if there are any regressions, and merge this, to be consistent with other operator traits
* run crater, get regressions, write a test for this with a note that "hey, we tried to fix it, its unfixable"
* decide, in the light of by-value DSTs, that this is a feature rather than a bug, and add a test

cc @rust-lang/libs

EDIT: the forth alternative is that there exist a genuine reason why this is the case, but I failed to see it :D
2019-04-17 19:18:51 +00:00
Esteban Küber
d56c82074b Fix ICE on const evaluation of const method 2019-04-17 12:00:35 -07:00
bors
8260e96760 Auto merge of #60013 - NieDzejkob:fix-16bit-usize, r=sanxiyn
Fix the max value of usize on 16-bit platforms
2019-04-17 16:23:25 +00:00
bors
6ed6f1461d Auto merge of #60034 - rasendubi:fix-comments, r=Centril
Small comments fix

- Fix comments around test harness generation
- Promote regular comments to rustdoc comments
2019-04-17 13:26:29 +00:00
Aleksey Kladov
cc3abc4d27 add a test for unsized index 2019-04-17 15:31:52 +03:00
Eduard-Mihai Burtescu
5f7055988b Resolve inconsistency in error messages between "parameter" and "variable". 2019-04-17 13:25:07 +03:00
Nick Cameron
dbbf87583b
Remove nrc from toolstate pings 2019-04-17 22:07:13 +12:00
bors
efe2f32a6b Auto merge of #60030 - Centril:rollup-3d0t24t, r=Centril
Rollup of 5 pull requests

Successful merges:

 - #59128 (Emit ansi color codes in the `rendered` field of json diagnostics)
 - #59646 (const fn: Improve wording)
 - #59986 (Miri: refactor new allocation tagging)
 - #60003 (LLD is not supported on Darwin)
 - #60018 (Miri now supports entropy, but is still slow)

Failed merges:

r? @ghost
2019-04-17 10:03:02 +00:00
Alexey Shmalko
56c0125568
Promote regular comments to rustdoc comments 2019-04-17 12:03:39 +03:00
Alexey Shmalko
7bf33f00bf
Fix comments around test harness generation 2019-04-17 12:02:04 +03:00
Mazdak Farrokhzad
eb958e1b2e
Rollup merge of #60018 - RalfJung:miri-test-libstd, r=oli-obk
Miri now supports entropy, but is still slow

Adjust the `cfg` and their comments in the test suites accordingly.
2019-04-17 10:31:37 +02:00
Mazdak Farrokhzad
23e8aaf471
Rollup merge of #60003 - petrhosek:llvm-lto-lld, r=cramertj
LLD is not supported on Darwin

Don't enable LLD when LTO is enabled on Darwin.
2019-04-17 10:31:36 +02:00
Mazdak Farrokhzad
3049f05ca1
Rollup merge of #59986 - RalfJung:miri-new-alloc, r=oli-obk
Miri: refactor new allocation tagging

Tagging and initializing `AllocExtra` now go hand-in-hand so one cannot forget to do one when doing the other. In particular, `memory.allocate` is now much easier to use correctly (because it will already return a tagged pointer).

r? @oli-obk
2019-04-17 10:31:35 +02:00
Mazdak Farrokhzad
0349b78e80
Rollup merge of #59646 - JohnTitor:improve-wording, r=oli-obk
const fn: Improve wording

fixes #59611

This might need discussion. Feel free to close this PR if we don't need to fix.
2019-04-17 10:31:33 +02:00
Mazdak Farrokhzad
c89bc54d4f
Rollup merge of #59128 - oli-obk:colorful_json, r=mark-i-m,eddyb
Emit ansi color codes in the `rendered` field of json diagnostics

cc @ljedrz

Implemented for https://github.com/rust-lang/rust/pull/56595#issuecomment-447645115 (x.py clippy)
2019-04-17 10:31:30 +02:00
Ralf Jung
d55e4b7a25 test sort_unstable in Miri 2019-04-17 09:47:36 +02:00
bors
e4e032a0ae Auto merge of #60027 - jethrogb:jb/sgx-reentry-abort, r=cramertj
SGX target: change re-entry abort logic

Even though re-entry after exit is generally not acceptable, there is a race condition where the enclave thinks it's exited but userspace doesn't know that yet. An entry during that time will currently result in an enclave panic (see https://github.com/rust-lang/rust/pull/59997#issuecomment-483846291, https://github.com/rust-lang/rust/pull/60003#issuecomment-483888170). Instead of panicking, just do a regular exit on re-entry.

cc @jseyfried
2019-04-17 07:05:39 +00:00
bors
258e3b3a75 Auto merge of #59974 - Centril:boostrap-to-2019-04-11, r=pietroalbini,Mark-Simulacrum
Bump bootstrap compiler to 2019-04-11

r? @pietroalbini
cc @Mark-Simulacrum
cc https://github.com/rust-lang/rust/pull/58702
2019-04-17 04:10:13 +00:00
Mazdak Farrokhzad
f2371e3b7d bump bootstrap; remove redundant 'use libc;' on macOS. 2019-04-17 05:45:37 +02:00
Mateusz Mikuła
87e4b43d51 Deny internal in stage0 2019-04-17 05:15:00 +02:00
Mazdak Farrokhzad
531a9bdbe6 bump bootstrap; nightly => 1.36. 2019-04-17 05:15:00 +02:00
Mazdak Farrokhzad
26e9a81c48 bump bootstrap; fix compiletest wrt. exclude_should_panic 2019-04-17 05:15:00 +02:00
Mazdak Farrokhzad
d6cc855190 bump bootstrap; remove redundant imports. 2019-04-17 05:15:00 +02:00
Mazdak Farrokhzad
6a1ca0ba17 bump bootstrap => 2019-04-11 2019-04-17 05:15:00 +02:00
Jethro Beekman
d0a1c2d3e0 SGX target: change re-entry abort logic 2019-04-16 18:18:32 -07:00
Ralf Jung
19485cc101 Miri: refactor new allocation tagging 2019-04-16 23:35:39 +02:00
bors
c132c96a6d Auto merge of #59997 - ehuss:update-cargo, r=alexcrichton
Update cargo

16 commits in 6f3e9c367abb497c64f360c3839dab5e74928d5c..b6581d383ed596b133e330011658c6f83cf85c2f
2019-04-04 14:11:33 +0000 to 2019-04-16 16:02:11 +0000
- Fix new_warning_with_corrupt_ws missing "USER". (rust-lang/cargo#6857)
- Ignore Clippy redundant_closure (rust-lang/cargo#6855)
- Pass OsStr/OsString args through to the process spawned by cargo run. (rust-lang/cargo#6849)
- Bump to 0.37.0 (rust-lang/cargo#6852)
- Fix test include_overrides_gitignore. (rust-lang/cargo#6850)
- Clarify optional registry key behaviour (rust-lang/cargo#6851)
- Ensure Summary::checksum works for registry crates (rust-lang/cargo#6842)
- Better error if PathSource::walk can't access something. (rust-lang/cargo#6841)
- Improve warning in `cargo new` with parse error. (rust-lang/cargo#6839)
- Improve error message for `publish` key restriction. (rust-lang/cargo#6838)
- Remove `Freshness` from `DependencyQueue` (rust-lang/cargo#6832)
- testsuite: cleanup for `alternative-registries` (rust-lang/cargo#6837)
- Improve error message to rerun a test in a workspace. (rust-lang/cargo#6824)
- Fix mutable_borrow_reservation_conflict warning. (rust-lang/cargo#6829)
- Add install-upgrade. (rust-lang/cargo#6798)
- Clarify docs of install without &lt;crate&gt; (rust-lang/cargo#6823)
2019-04-16 20:58:15 +00:00
Ralf Jung
9b21324db2 Miri now supports entropy, but is still slow 2019-04-16 20:04:17 +02:00
Eric Huss
df7445b780 Update cargo 2019-04-16 11:01:01 -07:00
Jakub Kądziołka
d9c42d5c84
Fix the max value of usize on 16-bit platforms 2019-04-16 18:55:58 +02:00
bors
70f130954d Auto merge of #59879 - ebarnard:patch-1, r=alexcrichton
Add a comment explaining why SecRandomCopyBytes is not used on MacOS

SecRandomCopyBytes is [available since MacOS 10.7](https://developer.apple.com/documentation/security/1399291-secrandomcopybytes?language=objc) which is the minimum supported version and which was suggested in https://github.com/rust-lang/rust/pull/58901#issuecomment-470188115 is the earliest version currently in use.

This matches the behaviour of other platforms which have a random number generator syscall available.
2019-04-16 16:04:12 +00:00
Oliver Scherer
5c6a43a58b Don't test json with color codes on windows 2019-04-16 17:35:49 +02:00
Ed Barnard
f1da89a667 Add a comment explaining why SecRandomCopyBytes is not used on MacOS 2019-04-16 13:58:44 +01:00
bors
3b27b4f592 Auto merge of #59769 - RalfJung:compiletest-normalization, r=alexcrichton
compiletest normalization: preserve non-JSON lines such as ICEs

Currently, every non-JSON line from stderr gets normalized away when compiletest normalizes the output. In particular, ICEs get normalized to the empty output. That does not seem desirable, so this changes normalization to preserve non-JSON lines instead.

Also see https://github.com/laumann/compiletest-rs/issues/169: because of that bug, Miri currently *looks* green in the toolstate, but some tests ICE. That same bug is likely no longer present in latest compiletest because the error code gets checked separately, but it still seems like a good idea to also make sure that ICEs are considered stderr output:
This change found an accidental user-visible `error!` in CTFE validation (fixed), and a non-deterministic panic when there are two `main` symbols (not fixed, no idea where this comes from). Both got missed before because non-JSON output got ignored.
2019-04-16 10:18:17 +00:00
Ralf Jung
28c4397b28 this panic occurs not just on Windows, normalize it away everywhere 2019-04-16 10:55:46 +02:00
bors
a7cef0bf08 Auto merge of #60007 - Centril:rollup-gdh1er4, r=Centril
Rollup of 6 pull requests

Successful merges:

 - #59717 (improve docs for std::hint::unreachable_unchecked())
 - #59903 (Continue evaluating after missing main)
 - #59973 (Fix rustdoc sidebar z-index)
 - #59992 (rustdoc: use --static-root-path for settings.js)
 - #59993 (include mode in unused binding suggestion span)
 - #60000 (Add repo-specific triagebot configuration)

Failed merges:

r? @ghost
2019-04-16 05:28:25 +00:00
Mazdak Farrokhzad
67ff8cfde8
Rollup merge of #60000 - pietroalbini:triagebot, r=Mark-Simulacrum
Add repo-specific triagebot configuration

r? @Mark-Simulacrum
cc https://github.com/rust-lang/triagebot/pull/9
2019-04-16 05:14:26 +02:00
Mazdak Farrokhzad
a95ca298a6
Rollup merge of #59993 - euclio:unused-ref-field, r=estebank
include mode in unused binding suggestion span

Fixes #54180.
2019-04-16 05:14:25 +02:00
Mazdak Farrokhzad
426e747b7e
Rollup merge of #59992 - QuietMisdreavus:static-settings-path, r=GuillaumeGomez
rustdoc: use --static-root-path for settings.js

At the time i was writing https://github.com/rust-lang/docs.rs/pull/332, i noticed that the `settings.js` file that was being loaded was not being loaded from the `--static-root-path`. This PR fixes that so that users on docs.rs can effectively cache this file.
2019-04-16 05:14:24 +02:00
Mazdak Farrokhzad
9014cfcee4
Rollup merge of #59973 - Enity:fix-rustdoc-sidebar, r=GuillaumeGomez
Fix rustdoc sidebar z-index

I think the screenshot will say everything:
![image](https://user-images.githubusercontent.com/2884517/56098429-37fa3680-5f09-11e9-8c54-4e2548aa0818.png)

live example: https://docs.rs/nom/4.2.3/nom/

I chose the smallest z-index to avoid problems with other blocks.
2019-04-16 05:14:22 +02:00