Commit Graph

80429 Commits

Author SHA1 Message Date
kennytm 20e32ee61f
Rollup merge of #52063 - mark-i-m:docs_link, r=kennytm
Add a link to the rustc docs
2018-07-06 12:56:29 +08:00
kennytm 3c21349e07
Rollup merge of #52055 - crlf0710:patch-3, r=Mark-Simulacrum
Include VS 2017 in error message.

Update error prompt message to indicate that VS 2017 is supported (for a while now).
2018-07-06 12:56:26 +08:00
kennytm f1a36fc29f
Rollup merge of #52080 - oli-obk:dep_dedup_diagnostics, r=kennytm
Improve dependency deduplication diagnostics

r? @kennytm

this is obviously hard to test 😆

cc #52072
2018-07-06 12:56:24 +08:00
kennytm 596d1a782d
Rollup merge of #52073 - xfix:patch-7, r=oli-obk
Add a punch card to weird expressions test
2018-07-06 12:56:23 +08:00
Zack M. Davis bbfdea28cd typo-fix stable ed'n error: "an onlyavailable" → "and only available" 2018-07-05 21:52:07 -07:00
Alex Crichton 23fbfb57cf rustc: Update tracking issue for wasm_import_module
It's now https://github.com/rust-lang/rust/issues/52090
2018-07-05 21:27:27 -07:00
Daniel Mueller fa7f7ac402
Fix typo in cell.rs 2018-07-05 21:18:12 -07:00
Jorge Aparicio f9145d01e1 update run-pass test 2018-07-05 20:18:19 -05:00
kennytm 6d35505b9b
Rollup merge of #52033 - zachrwolfe:outdated_value_comment, r=oli-obk
[Gardening] Update outdated comments: ByVal -> Scalar

ByVal enum cases in mir::interpret::value were renamed to Scalar a while ago but comments still refer to the old names.
2018-07-06 08:49:25 +08:00
kennytm b87b22e53c
Rollup merge of #52031 - RalfJung:arc, r=sfackler
Strenghten synchronization in `Arc::is_unique`

Previously, `is_unique` would not synchronize at all with a `drop` that returned
early because it was not the last reference, leading to a data race.

Fixes #51780

Unfortunately I have no idea how to add a test for this.

Cc @jhjourdan
2018-07-06 08:49:23 +08:00
kennytm 7ce7bf0e37
Rollup merge of #52030 - bowbahdoe:patch-1, r=alexcrichton
Any docs preposition change

This changes the docs referring to where a user should be wary of depending on "Any" trait impls from warning about relying on them "outside" of their code to warning about relying on them "inside" of their code.
2018-07-06 08:49:22 +08:00
kennytm ffc453abf7
Rollup merge of #52019 - michaelwoerister:cross-lto-auto-plugin, r=alexcrichton
[cross-lang-lto] Allow the linker to choose the LTO-plugin (which is useful when using LLD)

This PR allows for not specifying an LTO-linker plugin but still let `rustc` invoke the linker with the correct plugin arguments. This is useful when using LLD which does not need the `-plugin` argument. Since LLD is the best linker for this scenario anyway, this change should improve ergonomics quite a bit.

r? @alexcrichton
2018-07-06 08:49:20 +08:00
kennytm a4846aebd8
Rollup merge of #52016 - oli-obk:dedup_static_errors, r=estebank
Deduplicate error reports for statics

fixes #51970
2018-07-06 08:49:19 +08:00
kennytm 1568b5e6d7
Rollup merge of #52005 - alexcrichton:update-llvm-for-wasm, r=kennytm
Update LLVM to bring in a wasm codegen fix

Closes #51986
2018-07-06 08:49:18 +08:00
bors a8403e1cda Auto merge of #51861 - GuillaumeGomez:prevent-some-markdown-short-doc, r=QuietMisdreavus
Prevent some markdown transformation on short docblocks

Before:

<img width="1440" alt="screen shot 2018-06-28 at 01 46 01" src="https://user-images.githubusercontent.com/3050060/42005762-7d533bbe-7a76-11e8-8361-027886803399.png">

After:

<img width="1440" alt="screen shot 2018-06-28 at 01 46 02" src="https://user-images.githubusercontent.com/3050060/42005768-81bd59a0-7a76-11e8-819b-9b4be72579d6.png">

This is only performed on short doc blocks, not on plain ones. Not all transformations are prevented (you still have a few like urls, code blocks, etc...).

cc @nical

r? @QuietMisdreavus
2018-07-06 00:36:34 +00:00
Marco A L Barbosa f969b61bd6 Update musl to 1.1.19 and add patch to fix tls issue 2018-07-05 20:17:57 -03:00
kennytm 6650d7f1a2
Rollup merge of #51793 - GuillaumeGomez:search-result-hover, r=QuietMisdreavus
Fix variant background color on hover in search results

Fixes #51792.

<img width="1440" alt="screen shot 2018-06-26 at 00 37 24" src="https://user-images.githubusercontent.com/3050060/41879313-60ecf3be-78d9-11e8-9986-21af529ab758.png">

r? @QuietMisdreavus
2018-07-06 07:07:11 +08:00
kennytm 185fb7b77c
Rollup merge of #51619 - mksully22:ppc64le_rust, r=alexcrichton
rust: add initial changes to support powerpc64le musl

Initial changes to support rustc building on ppc64le with musl. A PR was also submitted to libc component https://github.com/rust-lang/libc/pull/1023 to add changes to libc musl definitions.

A PR was submitted on Alpine https://github.com/alpinelinux/aports/pull/4549 with equivalent temporary patches for building on Alpine for now.

As a verification test a github project was put together to build ppc64le versions of rustc, rust-stdlib, and cargo on Alpine, https://github.com/mksully22/ppc64le_alpine_rust_1.26.2
2018-07-06 07:07:10 +08:00
bors 00f49728e0 Auto merge of #51732 - GuillaumeGomez:cmd-line-lint-rustdoc, r=QuietMisdreavus
Add command line lint manipulation in rustdoc

Fixes #50082.

r? @QuietMisdreavus
2018-07-05 22:28:53 +00:00
Jorge Aparicio 0ed32313a2 #[cfg(target_has_atomic_cas)] -> #[cfg(target_has_atomic = "cas")] 2018-07-05 16:52:46 -05:00
Jorge Aparicio bbf688a84d enable Atomic*.{load,store} for ARMv6-M / MSP430
closes #45085

this commit adds an `atomic_cas` target option and an unstable `#[cfg(target_has_atomic_cas)]`
attribute to enable a subset of the `Atomic*` API on architectures that don't support atomic CAS
natively, like MSP430 and ARMv6-M.
2018-07-05 16:44:29 -05:00
Josh Stone 557736befc Update scalar pairs per review comments 2018-07-05 14:22:09 -07:00
Eduard-Mihai Burtescu ce94518ed3 rustc_codegen_llvm: replace the first argument early in FnType::new_vtable. 2018-07-06 00:17:13 +03:00
bors 2d5a295d51 Auto merge of #51917 - alexcrichton:update, r=Mark-Simulacrum
Update crates in `Cargo.lock`

This is a "hopefully routine" update of our crates.io-based crates in
`Cargo.lock`, and let's see how it fares on CI...
2018-07-05 20:25:00 +00:00
Santiago Pastorino 25266c1840
Do not run AST borrowck when -Zborrowck=mir 2018-07-05 16:57:32 -03:00
Guillaume Gomez e221be89e0 Add command line lint manipulation in rustdoc 2018-07-05 21:07:51 +02:00
bors 478226cc2a Auto merge of #51599 - GuillaumeGomez:reduce-search-index, r=QuietMisdreavus
reduce search-index size

Reduce size of `search-index.js` of around 16%:

Going from `2996785` bytes to `2545583`.

r? @QuietMisdreavus
2018-07-05 18:21:25 +00:00
Guillaume Gomez 92cda8c7da Whitelist lints 2018-07-05 20:06:33 +02:00
Oliver Schneider f352e98ddc Address review comments 2018-07-05 19:30:06 +02:00
Oliver Schneider f1e3a5a24b Only display difference of features, not all features 2018-07-05 19:02:43 +02:00
Josh Stone e578976560 Store scalar pair bools as i8 in memory
We represent `bool` as `i1` in a `ScalarPair`, unlike other aggregates,
to optimize IR for checked operators and the like.  With this patch, we
still do so when the pair is an immediate value, but we use the `i8`
memory type when the value is loaded or stored as an LLVM aggregate.

So `(bool, bool)` looks like an `{ i1, i1 }` immediate, but `{ i8, i8 }`
in memory.  When a pair is a direct function argument, `PassMode::Pair`,
it is still passed using the immediate `i1` type, but as a return value
it will use the `i8` memory type.  Also, `bool`-like` enum tags will now
use scalar pairs when possible, where they were previously excluded due
to optimization issues.
2018-07-05 09:59:52 -07:00
Oliver Schneider 82a1328740 Vertical list of tools to check 2018-07-05 18:48:56 +02:00
Alex Crichton d825115978 Update Cargo.lock dependencies
Run `cargo update` and let's see how far we can get!
2018-07-05 09:30:27 -07:00
Val Markovic dc425e2e64
Clarifying how the alignment of the struct works
The docs were not specifying how to compute the alignment of the struct, so I had to spend some time trying to figure out how that works. Found the answer [on this page](http://camlorn.net/posts/April%202017/rust-struct-field-reordering.html):

> The total size of this struct is 5, but the most-aligned field is b with alignment 2, so we round up to 6 and give the struct an alignment of 2 bytes.
2018-07-05 09:24:03 -07:00
Guillaume Gomez 1ff7f04120 Fix rustdoc run failures by shutting down definitely some lints 2018-07-05 17:18:45 +02:00
bors 94eb176055 Auto merge of #52012 - oli-obk:clippy, r=kennytm
Update the clippy submodule
2018-07-05 11:44:08 +00:00
Oliver Schneider d5dbeda9ef Update the clippy submodule 2018-07-05 13:42:12 +02:00
csmoe ff83ef0c24 merge wellformed(wc)s 2018-07-05 18:49:02 +08:00
csmoe dabd3f6935 split IntoWellFormedGoal 2018-07-05 18:47:00 +08:00
csmoe 329d03ac1f update test 2018-07-05 18:47:00 +08:00
csmoe e2f3577131 wellformed wc 2018-07-05 18:46:43 +08:00
Mikhail Modin f247a3e490 fix for issue #8636 2018-07-05 11:34:10 +01:00
Konrad Borowski 0ce01776ba Add a punch card to weird expressions test 2018-07-05 12:31:09 +02:00
bors 69b9e1e8f9 Auto merge of #51967 - varkor:const-body-break-continue, r=estebank
Fix various issues with control-flow statements inside anonymous constants

Fixes #51761.
Fixes #51963 (and the host of other reported issues there).
(Might be easiest to review per commit, as they should be standalone.)

r? @estebank
2018-07-05 09:40:08 +00:00
csmoe e7e8c72fdd update test 2018-07-05 17:38:44 +08:00
bors 6fc21e5576 Auto merge of #51936 - japaric:rust-lld, r=alexcrichton
rename rustc's lld to rust-lld

to not shadow the system installed LLD when linking with LLD.

Before:

- `-C linker=lld -Z linker-flavor=ld.lld` uses rustc's LLD
- It's not possible to use a system installed LLD that's named `lld`

With this commit:

- `-C linker=rust-lld -Z linker-flavor=ld.lld` uses rustc's LLD
- `-C linker=lld -Z linker-flavor=ld.lld` uses the system installed LLD

we don't offer guarantees about the availability of LLD in the rustc sysroot so we can rename the tool as long as we don't break the wasm32-unknown-unknown target which depends on it.

r? @alexcrichton we discussed this before
2018-07-05 06:44:16 +00:00
Jorge Aparicio 31ed5c7a01 in the second copy lld is already named rust-lld 2018-07-04 23:10:10 -05:00
bors c865d3934c Auto merge of #51938 - zackmdavis:and_the_case_of_the_leaking_desugar, r=estebank
in which we plug the crack where `?`-desugaring leaked into errors

Most of the time, it's not a problem that the types of the arm bodies in
a desugared-from-`?` match are different (that is, specifically: in `x?`
where x is a `Result<A, B>`, the `Ok` arm body is an `A`, whereas the
`Err` arm diverges to return a `Result<A, B>`), because they're being
assigned to different places. But in tail position, the types do need to
match, and our error message was explicitly referring to "match arms",
which is confusing when there's no `match` in the sweetly sugared
source.

It is not without some misgivings that we pollute the clarity-of-purpose
of `note_error_origin` with the suggestion to wrap with `Ok` (the other
branches are pointing out the odd-arm-out in the HIR that is the origin
of the error; the new branch that issues the `Ok` suggestion is serving
a different purpose), but it's the natural place to do it given that
we're already matching on `ObligationCauseCode::MatchExpressionArm {
arm_span, source }` there.

Resolves #51632.
2018-07-05 02:35:25 +00:00
Santiago Pastorino 0e31e2fa9b
Remove rustc_mir_borrowck attribute and use rustc_mir instead 2018-07-04 23:10:28 -03:00
csmoe 37228fe632 reverse_postorder 2018-07-05 09:46:10 +08:00