Commit Graph

96640 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
a57c4f6297
Rollup merge of #61884 - crlf0710:stablize_euc, r=dtolnay,Centril
Stablize Euclidean Modulo (feature euclidean_division)

Closes #49048
2019-07-25 23:20:53 +02:00
Mazdak Farrokhzad
845e146d04
Rollup merge of #60938 - jonas-schievink:doc-include-paths, r=petrochenkov
rustdoc: make #[doc(include)] relative to the containing file

This matches the behavior of other in-source paths like `#[path]` and the `include_X!` macros.

Fixes https://github.com/rust-lang/rust/pull/58373#issuecomment-462349380
Also addresses https://github.com/rust-lang/rust/issues/44732#issuecomment-467660239

cc #44732

This is still missing a stdsimd change (42ed30e0b5), so CI will currently fail. I'll land that change once I get initial feedback for this PR.
2019-07-25 23:20:51 +02:00
Mazdak Farrokhzad
3b19dc96fc
Rollup merge of #60066 - sfackler:type-name, r=Centril
Stabilize the type_name intrinsic in core::any

Stabilize `type_name` in `core::any`.

Closes rust-lang/rfcs#1428

FCP completed over there.

`RELEASES.md`: Prefer T-libs for categorization.
2019-07-25 23:20:49 +02:00
Esteban Küber
684497648a review comments: add FIXME comments and formatting 2019-07-25 12:36:51 -07:00
Hugo Beauzée-Luyssen
7ed5c36934 Add UWP mingw targets 2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
e88a4cee52 std: win: Disable stack overflow handling on UWP
The required functions are not available, so hope for the best
2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
668f0d3495 std: win: Don't use console APIs on UWP 2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
4c05073d1d std: win: Don't use GetFileInformationByHandle on UWP 2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
a24be59b46 std: win: Don't use GetUserProfileDirectoryW on UWP 2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
ef267284e8 std: win: Don't expose link() on UWP
Or rather expose it, but always return an error
2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
a713a0399a std: win: Don't use SetHandleInformation on UWP
Attempt to create sockets with the WSA_FLAG_NO_HANDLE_INHERIT flag, and
handle the potential error gracefully (as the flag isn't support on
Windows 7 before SP1)
2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
9407ed759f std: rand: Use BCrypt on UWP
As Rtl* functions are not allowed there
2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
642f8cd9c2 libunwind: Use libunwind when targeting UWP
libgcc's support is using forbidden functions
2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
3becaf4b9b std: Link UWP with allowed libraries only 2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
ce315cd2fe bootstrap: Build startup object for all windows-gnu target
So that uwp-windows-gnu also gets its startup objects built
2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
e34bcdbc57 libstd: windows: compat: Allow use of attributes 2019-07-25 21:30:08 +02:00
Hugo Beauzée-Luyssen
5af318bd56 rustc: codegen: Build import library for all windows targets
So far it is assumed that using a DLL as a -l parameter argument is ok,
but the assumption doesn't hold when compiling the native code with
llvm.
In which case, an import library is required, so let's build one
This also requires the cargo counterpart to add the import library in
the stamp files, at least when compiling libstd. Otherwise, the files
don't get uplifted
2019-07-25 21:30:08 +02:00
Philipp Hansch
dd0f2ac250
librustc_errors: Support ui-testing flag in annotate-snippet emitter
This adds support for the `-Z ui-testing` flag to the new
annotate-snippet diagnostic emitter.

The support for the flag was added to `annotate-snippet-rs` in these PRs:

* https://github.com/rust-lang/annotate-snippets-rs/pull/3
* https://github.com/rust-lang/annotate-snippets-rs/pull/5

Closes #61811
2019-07-25 21:03:53 +02:00
bors
890881f8f4 Auto merge of #60340 - mgeier:cap-vs-capacity, r=alexcrichton
Rename .cap() methods to .capacity()

As mentioned in #60316, there are a few `.cap()` methods, which seem out-of-place because such methods are called `.capacity()` in the rest of the code.

This PR renames them to `.capacity()` but leaves `RawVec::cap()` in there for backwards compatibility.

I didn't try to mark the old version as "deprecated", because I guess this would cause too much noise.
2019-07-25 18:45:42 +00:00
Mark Rousskov
0e022f87e7 Remove needless indirection through Rc
NamedMatch is already cheap to clone due to Lrc's inside.
2019-07-25 13:26:20 -04:00
Esteban Küber
3ab60264b5 Add note suggesting to borrow a String argument to find 2019-07-25 10:11:03 -07:00
Lukas Kalbertodt
9d39758d14
Remove cfg(bootstrap) code for array implementations
In PR #62435 ("Use const generics for array impls [part 1]") the old
macro-based implementations were not removed but still used with
`cfg(bootstrap)` since the bootstrap compiler had some problems with
const generics at the time. This does not seem to be the case anymore,
so there is no reason to keep the old code.
2019-07-25 18:06:26 +02:00
Tomasz Różański
50d9b06f97 Fix inconsistent highlight blocks. 2019-07-25 17:56:58 +02:00
Pietro Albini
b01b5b911f
ci: gate toolstate repo pushes on the TOOLSTATE_PUBLISH envvar
Unfortunately due to an Azure quirk the TOOLSTATE_REPO_ACCESS_TOKEN is
not suitable to gate whether to push new commits to the repo, as if it's
not defined on the Azure side it will actually be set to the literal
`$(TOOLSTATE_REPO_ACCESS_TOKEN)`, which screws everything up.

This instead adds another, non-secret environment variable to gate
publishing: TOOLSTATE_PUBLISH. As non-secret environment variables
behave correctly this fixes the issue.
2019-07-25 11:51:08 +02:00
bors
eedf6ce4ef Auto merge of #62944 - RalfJung:miri, r=oli-obk
bump Miri

Fixes https://github.com/rust-lang/rust/issues/62919.

r? @oli-obk
2019-07-25 06:14:48 +00:00
Steven Fackler
91fa898975 Stabilize the type_name intrinsic in core::any
Closes rust-lang/rfcs#1428
2019-07-24 21:35:49 -07:00
bors
185b9acb66 Auto merge of #62961 - Centril:rollup-kydeswa, r=Centril
Rollup of 9 pull requests

Successful merges:

 - #61727 (Add binary dependencies to dep-info files)
 - #62736 (Polonius: fix some cases of `killed` fact generation, and most of the `ui` test suite)
 - #62758 (ci: Install clang on Windows through tarballs)
 - #62784 (Add riscv32i-unknown-none-elf target)
 - #62814 (add support for hexagon-unknown-linux-musl)
 - #62827 (Don't link mcjit/interpreter LLVM components)
 - #62901 (cleanup: Remove `extern crate serialize as rustc_serialize`s)
 - #62903 (Support SDKROOT env var on iOS)
 - #62906 (Require a value for configure --debuginfo-level)

Failed merges:

 - #62910 (cleanup: Remove lint annotations in specific crates that are already enforced by rustbuild)

r? @ghost
2019-07-25 02:04:55 +00:00
Esteban Küber
70c817aee3 Allow lexer to recover from some homoglyphs 2019-07-24 16:10:42 -07:00
Mazdak Farrokhzad
0340d72bf5
Rollup merge of #62906 - cuviper:debuginfo-level, r=Mark-Simulacrum
Require a value for configure --debuginfo-level

In `configure.py`, using the `o` function creates an enable/disable
boolean setting, and writes `true` or `false` in `config.toml`. However,
rustbuild is expecting to parse a `u32` debuginfo level. We can change
to the `v` function to have the options require a value.
2019-07-25 01:05:07 +02:00
Mazdak Farrokhzad
6e1ed3a116
Rollup merge of #62903 - swolchok:ios-sdkroot, r=alexcrichton
Support SDKROOT env var on iOS

Following what clang does (296a80102a/clang/lib/Driver/ToolChains/Darwin.cpp (L1661-L1678)), allow allow SDKROOT to tell us where the Apple SDK lives so we don't have to invoke xcrun.

Replaces #62551.
2019-07-25 01:05:05 +02:00
Mazdak Farrokhzad
5a7db0e19a
Rollup merge of #62901 - petrochenkov:serde, r=Centril
cleanup: Remove `extern crate serialize as rustc_serialize`s
2019-07-25 01:05:03 +02:00
Mazdak Farrokhzad
e5590425e9
Rollup merge of #62827 - nikic:llvm-components, r=alexcrichton
Don't link mcjit/interpreter LLVM components

We don't use these. Drop related unused ExecutionEngine header uses.

As some drive-by cleanup drop the unused `EnableARMEHABI` global and remove an outdated version check for the hexagon component.

r? @alexcrichton
2019-07-25 01:05:02 +02:00
Mazdak Farrokhzad
b1a866012d
Rollup merge of #62814 - androm3da:hexagon_19jul_2019, r=alexcrichton
add support for hexagon-unknown-linux-musl
2019-07-25 01:05:00 +02:00
Mazdak Farrokhzad
8d9000d38c
Rollup merge of #62784 - Disasm:riscv32i, r=estebank
Add riscv32i-unknown-none-elf target

This target is likely to be useful for constrained FPGA soft-cores, such as picorv32 and HeavyX.
2019-07-25 01:04:59 +02:00
Mazdak Farrokhzad
5ef2162fb1
Rollup merge of #62758 - alexcrichton:llvm-tarball-windows, r=pietroalbini
ci: Install clang on Windows through tarballs

Previously we used the executables built the LLVM project but these
executables are difficult to run in a CI environment, they can
accidentally pollute global state, etc. In testing some of the possible
4-core machine environments for Azure this step would frequently cause
issues.

To assuage these future issues and hopefully make builds slightly more
self-contained, this commit changes to install from a tarball instead.
The tarball isn't provided by LLVM itself, but we use the offical LLVM
installer to extract itself and then we pack up the LLVM installation
directory into the tarball.
2019-07-25 01:04:57 +02:00
Mazdak Farrokhzad
a676a36662
Rollup merge of #62736 - lqd:polonius_tests3, r=matthewjasper
Polonius: fix some cases of `killed` fact generation, and most of the `ui` test suite

Since basic Polonius functionality was re-enabled by @matthewjasper in #54468, some tests were still failing in the polonius compare-mode.

This PR fixes all but one test in the `ui` suite by:
- fixing some bugs in the fact generation code, related to the `killed` relation: Polonius would incorrectly reject some NLL-accepted code, because of these missing `killed` facts.
- ignoring some tests in the polonius compare-mode: a lot of those manually test the NLL or migrate mode, and the failures were mostly artifacts of the test revisions, e.g. that `-Z polonius` requires full NLLs. Some others were also both failing with NLL and succeeding with Polonius, which we can't encode in tests at the moment.
- blessing the output of some tests: whenever Polonius and NLL have basically the same errors, except for diagnostics differences, the Polonius output is blessed. Whenever we've advanced into a less experimental phase, we'll want to revisit these cases (much like we did on the NLL test suite last year) to specifically work on diagnostics.

Fact generation changes:
- we now kill loans on the destination place of `Call` terminators
- we now kill loans on the locals destroyed by `StorageDead`
- we now also handle assignments to projections: killing the loans on a either a deref-ed local, or the ones whose `borrowed_place` conflicts with the current place.

One failing test remains: an overflow during fact generation, on a case of polymorphic recursion (and which I'll continue investigating later).

This adds some tests for the fact generation changes, with some simple Polonius cases similar to the existing smoke tests, but also for some cases encountered in the wild (in the `rand` crate for example).

A more detailed write-up is available [here](https://hackmd.io/CjYB0fs4Q9CweyeTdKWyEg?view) with an explanation for each test failure, the steps taken to resolve it (as a commit in the current PR), NLL and Polonius outputs (and diff), etc.

Since they've worked on this before, and we've discussed some of these failures together:

r? @matthewjasper
2019-07-25 01:04:55 +02:00
Mazdak Farrokhzad
40be4000b9
Rollup merge of #61727 - Mark-Simulacrum:crate-deps-in-deps, r=alexcrichton
Add binary dependencies to dep-info files

I'm not sure about the lack of incremental-tracking here, but since I'm pretty sure this runs on every compile anyway it might not matter? If there's a better place/way to get at the information I want, I'm happy to refactor the code to match.

r? @alexcrichton
2019-07-25 01:04:54 +02:00
Yuki Okushi
404281125e Use Foo instead of raw arrays 2019-07-25 07:47:57 +09:00
Ralf Jung
f2900b0b41 re-enable debug checks in Miri 2019-07-24 20:47:24 +02:00
Ralf Jung
01512616d1 bump Miri 2019-07-24 20:18:15 +02:00
Scott Wolchok
287db19e9a Add comment 2019-07-24 10:28:14 -07:00
Kevin W Matthews
c0918183a7 Use match ergonomics in Condvar documentation 2019-07-24 09:36:49 -07:00
bors
03f19f7ff1 Auto merge of #62935 - Centril:rollup-hzj9att, r=Centril
Rollup of 10 pull requests

Successful merges:

 - #62641 (Regenerate character tables for Unicode 12.1)
 - #62716 (state also in the intro that UnsafeCell has no effect on &mut)
 - #62738 (Remove uses of mem::uninitialized from std::sys::cloudabi)
 - #62772 (Suggest trait bound on type parameter when it is unconstrained)
 - #62890 (Normalize use of backticks in compiler messages for libsyntax/*)
 - #62905 (Normalize use of backticks in compiler messages for doc)
 - #62916 (Add test `self-in-enum-definition`)
 - #62917 (Always emit trailing slash error)
 - #62926 (Fix typo in mem::uninitialized doc)
 - #62927 (use PanicMessage in MIR, kill InterpError::description)

Failed merges:

r? @ghost
2019-07-24 15:59:00 +00:00
Mark Rousskov
d749b5e223 Gate binary dependency information behind -Zbinary-dep-depinfo 2019-07-24 11:00:09 -04:00
Mark Rousskov
eafb42dc94 Add binary dependencies to dep-info files 2019-07-24 10:49:22 -04:00
Mazdak Farrokhzad
e27927d2ff
Rollup merge of #62927 - RalfJung:panic, r=oli-obk
use PanicMessage in MIR, kill InterpError::description

r? @oli-obk @eddyb
Cc @saleemjaffer https://github.com/rust-rfcs/const-eval/issues/4
2019-07-24 16:13:23 +02:00
Mazdak Farrokhzad
0466237555
Rollup merge of #62926 - Smibu:fix-typo, r=jonas-schievink
Fix typo in mem::uninitialized doc
2019-07-24 16:13:22 +02:00
Mazdak Farrokhzad
c44e29bb59
Rollup merge of #62917 - estebank:trailing-slash, r=matklad
Always emit trailing slash error

Fix #62913.

r? @petrochenkov
2019-07-24 16:13:20 +02:00
Mazdak Farrokhzad
92aff0a982
Rollup merge of #62916 - Centril:self-in-enum-def, r=oli-obk
Add test `self-in-enum-definition`

Apparently there was no test covering this...

r? @oli-obk
cc @petrochenkov
2019-07-24 16:13:18 +02:00
Mazdak Farrokhzad
52247b2383
Rollup merge of #62905 - fakenine:normalize_use_of_backticks_compiler_messages_p16, r=Centril
Normalize use of backticks in compiler messages for doc

https://github.com/rust-lang/rust/issues/60532
2019-07-24 16:13:17 +02:00